{"id":26025377,"url":"https://github.com/yakbrother/astro-accessibilty","last_synced_at":"2025-03-06T13:37:11.737Z","repository":{"id":279578461,"uuid":"939054690","full_name":"yakbrother/astro-accessibilty","owner":"yakbrother","description":"A package to test accessibility rules for your astrp","archived":false,"fork":false,"pushed_at":"2025-03-05T18:07:49.000Z","size":271,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T18:36:42.373Z","etag":null,"topics":["accessibility","ally","astro"],"latest_commit_sha":null,"homepage":"https://timeaton.dev","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yakbrother.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-25T23:16:22.000Z","updated_at":"2025-03-05T18:05:43.000Z","dependencies_parsed_at":"2025-02-26T10:29:14.221Z","dependency_job_id":"ab7b91bb-fba3-4f38-8092-704827c1eedb","html_url":"https://github.com/yakbrother/astro-accessibilty","commit_stats":null,"previous_names":["yakbrother/astro-accessibilty"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakbrother%2Fastro-accessibilty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakbrother%2Fastro-accessibilty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakbrother%2Fastro-accessibilty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakbrother%2Fastro-accessibilty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yakbrother","download_url":"https://codeload.github.com/yakbrother/astro-accessibilty/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242219641,"owners_count":20091639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accessibility","ally","astro"],"created_at":"2025-03-06T13:37:11.184Z","updated_at":"2025-03-06T13:37:11.728Z","avatar_url":"https://github.com/yakbrother.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Astro Accessibility Checker\n\nA comprehensive accessibility checker for Astro projects that provides detailed explanations and documentation links for any accessibility issues found.\n\n## Installation\n\nYou can install this package from GitHub Packages:\n\n1. First, authenticate with GitHub Packages. Create or edit the `.npmrc` file in your project root:\n\n```ini\n@yakbrother:registry=https://npm.pkg.github.com\nregistry=https://registry.npmjs.org/\nalways-auth=true\n```\n\n2. Login to GitHub Packages (you only need to do this once):\n\n```bash\nnpm login --registry=https://npm.pkg.github.com\n```\n\n3. Install the package:\n\n```bash\nnpm install @yakbrother/astro-accessibility\n```\n\nNote: You need to have read access to the repository to install the package. If you're having trouble, make sure:\n\n- You're logged in to GitHub\n- You have authenticated with GitHub Packages\n- You have access to the repository\n\n## Usage\n\nYou can use this package in three ways:\n\n### 1. Automatic Integration (Recommended)\n\nAdd the integration to your `astro.config.mjs`:\n\n```javascript\nimport { defineConfig } from \"astro/config\";\nimport accessibility from \"@yakbrother/astro-accessibility/integration\";\n\nexport default defineConfig({\n  integrations: [\n    accessibility({\n      // Options (all optional)\n      enableDevChecks: true, // Run during development\n      enableBuildChecks: true, // Run during build\n      failOnErrors: true, // Whether to fail the build if issues are found\n      checkInterval: 5000, // How often to check during development (ms)\n      // DANGER: Only use in emergencies - NOT RECOMMENDED\n      // forceBuild: false,      // Set to true to build even with violations\n    }),\n  ],\n});\n```\n\nThis will:\n\n- Run accessibility checks automatically during development\n- Check pages after file changes (with debouncing)\n- Run a final check during the build process\n- Provide immediate feedback in the console\n\n\u003e ⚠️ **Emergency Builds with Violations**\n\u003e\n\u003e While strongly discouraged, you can force a build even when accessibility violations are present:\n\u003e\n\u003e ```javascript\n\u003e accessibility({\n\u003e   failOnErrors: true,\n\u003e   forceBuild: true, // DANGER: This will allow builds with accessibility violations\n\u003e });\n\u003e ```\n\u003e\n\u003e **WARNING**: This should only be used in emergency situations where a deploy is critical.\n\u003e Building with accessibility violations may make your site unusable for some visitors.\n\u003e Always fix accessibility issues as soon as possible.\n\nYou can also use it with other integrations:\n\n```javascript\nimport { defineConfig } from \"astro/config\";\nimport react from \"@astrojs/react\";\nimport accessibility from \"@yakbrother/astro-accessibility/integration\";\n\nexport default defineConfig({\n  integrations: [\n    react(), // Add React support\n    accessibility({\n      // Enable all checks during development\n      enableDevChecks: true,\n      // But only run static checks during build to keep CI fast\n      enableBuildChecks: true,\n      failOnErrors: true,\n      // Configuration will auto-detect React and only run React-specific tests\n      // when React components are present\n    }),\n  ],\n});\n```\n\n### 2. Command Line Interface\n\n```bash\nnpx astro-a11y http://localhost:3000\n```\n\nOptions:\n\n- `-v, --verbose`: Show more detailed information about each violation\n- `--skip-dynamic`: Skip dynamic content testing\n- `--skip-astro`: Skip Astro-specific component testing\n- `--hydration-timeout \u003cms\u003e`: Set maximum wait time for hydration (default: 5000ms)\n- `--frameworks \u003clist\u003e`: Specify frameworks to test as comma-separated list (default: react,vue)\n- `--auto-detect`: Auto-detect frameworks and skip tests for unused ones (default: true)\n\n### 2. Programmatic Usage\n\n```javascript\nconst { checkAccessibility } = require(\"astro-accessibility\");\n\nawait checkAccessibility(\"http://localhost:3000\", {\n  verbose: true,\n  // Optional advanced testing configuration\n  dynamicTesting: {\n    enabled: true, // Enable/disable dynamic content testing\n    waitForHydration: true, // Wait for Astro islands to hydrate\n    routeChanges: true, // Test accessibility after route changes\n    ajaxTimeout: 5000, // Timeout for AJAX updates (ms)\n  },\n  astroTesting: {\n    enabled: true, // Enable/disable Astro-specific testing\n    testIslands: true, // Test individual Astro islands\n    frameworks: [\"react\", \"vue\"], // Test specific framework components\n    ignoreHydrating: false, // Whether to ignore elements during hydration\n  },\n});\n```\n\n## Extra Docs\n\nSee [DOCS.md](DOCS.md) for detailed usage instructions and best practices.\n\n## Features\n\n### Standards and Guidelines Checked\n\nThe tool checks against the following accessibility standards and guidelines:\n\n#### Core Standards\n\n- **WCAG 2.1 Level A** - Basic web accessibility requirements\n- **WCAG 2.1 Level AA** - Standard level of accessibility for most websites\n- **WAI-ARIA 1.2** - Rich Internet Applications accessibility guidelines\n- **Section 508** - US federal accessibility requirements\n\n#### Additional Guidelines\n\n- **EN 301 549** - European accessibility requirements for ICT products and services\n- **AODA** - Accessibility for Ontarians with Disabilities Act\n- **ADA** - Americans with Disabilities Act web accessibility requirements\n\n#### Framework-Specific Guidelines\n\n- **React Accessibility Guidelines**\n- **Vue Accessibility Guidelines**\n- **Astro Component Accessibility Best Practices**\n\n#### Mobile Accessibility\n\n- **WCAG 2.1 Mobile Success Criteria**\n- **iOS Accessibility Guidelines**\n- **Android Accessibility Guidelines**\n\n### Comprehensive Accessibility Checks\n\n- **Page Structure \u0026 Navigation**\n\n  - Proper HTML landmarks (`\u003cheader\u003e`, `\u003cnav\u003e`, `\u003cmain\u003e`, `\u003caside\u003e`, `\u003cfooter\u003e`)\n  - Heading hierarchy and structure\n  - Skip links and keyboard navigation\n  - Document title and language\n\n- **Content Accessibility**\n\n  - Image alternative text\n  - Color contrast ratios\n  - Link and button labels\n  - Form control labels and associations\n  - Focus management and tab order\n\n- **ARIA Implementation**\n  - Valid ARIA attributes\n  - Proper role usage\n  - Required ARIA properties\n  - Dynamic content updates\n\n### User-Friendly Reporting\n\n- **Priority-Based Issues**\n\n  - High Priority - Must Fix\n  - Important - Should Fix\n  - Medium Priority\n  - Low Priority\n\n- **Actionable Feedback**\n  - Clear, plain-language explanations\n  - Step-by-step fix instructions\n  - Code examples for common solutions\n  - Best practices and tips\n\n### Comprehensive Documentation\n\n- **Integrated Resource Links**\n  - WCAG 2.1 Guidelines\n  - MDN Web Docs (Mozilla)\n  - WebAIM Articles\n  - The A11Y Project\n  - Deque University\n\n## Roadmap\n\nSee [ROADMAP.md](ROADMAP.md) for upcoming features and planned improvements.\n\n## Requirements\n\n- Node.js 14 or higher\n- Astro 3.0 or higher\n\n## Framework Auto-Detection\n\nThe tool now includes intelligent framework detection:\n\n- Automatically detects which frameworks (React, Vue, etc.) are used in your project\n- Only runs framework-specific tests for frameworks that are actually present\n- Improves performance by skipping unnecessary tests\n- Can be disabled with `--auto-detect=false` if you need to force specific framework tests\n\n## Error Handling and Reporting\n\nImproved error handling and reporting features:\n\n- Detailed error messages with specific line numbers and elements\n- Grouped violations by severity and type\n- Clear, actionable fix suggestions\n- Performance impact considerations\n- Links to relevant accessibility guidelines\n\n## License\n\nMIT License\n\nCopyright (c) 2025 Tim Eaton\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nWe welcome contributions! If you'd like to help implement any of these features, please check our contributing guidelines.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyakbrother%2Fastro-accessibilty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyakbrother%2Fastro-accessibilty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyakbrother%2Fastro-accessibilty/lists"}