Documentation
Everything you need to scan and fix accessibility issues with a11y-fixer. This page covers installation through CI integration.
Installation
Install globally with npm:
npm install -g a11y-fixerOr run it without installing:
npx a11y-fixer scan https://example.comUsage
Point scan at a URL or a local directory of built HTML:
# Scan a live site
a11y-fixer scan https://example.com
# Scan a build output directory
a11y-fixer scan ./dist
# Apply safe automated fixes in place
a11y-fixer fix ./dist --writeConfiguration
Drop an a11y-fixer.config.json in your project root to set defaults:
{
"standard": "WCAG2AA",
"ignore": ["color-contrast"],
"report": { "format": "html", "out": "a11y-report.html" }
}Continuous integration
Fail the build when new violations appear. Example GitHub Action:
- name: Accessibility check
run: npx a11y-fixer scan ./dist --fail-on errorFix catalog
a11y-fixer can automatically repair the most common issues, including:
- Missing or empty image alternative text
- Form controls without associated labels
- Insufficient color contrast
- Invalid or redundant ARIA attributes
- Missing document language and landmark roles
Contributing
a11y-fixer is open source and welcomes contributions. See the repository for the contributor guide and open issues.