a11y-checker
Framework-agnostic accessibility scanner for AI agents and CI. Scan any web app, whatever it is built with, or lint source code directly. Scan a whole project or just the files and directories you name. Findings are structured, each with a fix hint.
- Web engine (any framework): renders a URL, an HTML page or an HTML string in Chromium and runs axe-core. It checks what the browser actually shows, so it works for any stack: React, Next.js, Angular, Vue, Svelte, plain HTML/JS and more.
- Source engine (no running app needed): lints code directly. Supported today:
- Agent ready: a CLI with
--json, an MCP server, an agent skill and an AGENTS.md block. An agent scans, fixes and rescans, limited to the files or directories you name.
For frameworks without a source linter yet (Svelte, template engines such as Handlebars or EJS), scan the running app's URL. A source scan tells you when it skipped files it has no rules for, so a clean result is never silent about what it didn't check.
Upgrading from v2? v3 is a rewrite. See Migrating from v2.
Install
npm install --save-dev a11y-checker
npx playwright install chromium # needed for web scans
npx a11y-checker init does the install for you: it adds a11y-checker and, for an Astro project, eslint-plugin-astro, using the project's package manager after asking. It also offers to add the a11y instructions to AGENTS.md. It only prints what it would do when it isn't run in a terminal, and --yes skips the questions.
Requires Node 22+. The Chromium download is only needed for the web engine (URLs, HTML files and strings, and full HTML pages found in a directory scan); a scan of source code alone doesn't use it.
CLI
npx a11y-checker https://example.com # a URL
npx a11y-checker ./dist/index.html # an HTML file
npx a11y-checker src # a source directory (React, Next.js, React Native)
npx a11y-checker src/Button.tsx # a single source file
npx a11y-checker src/cart src/Header.tsx # only these directories and files
npx a11y-checker '<img src="a.png">' # an HTML string
Pass several targets to scan only those. The target decides the engine: URLs, full HTML pages and HTML strings use web; other files and directories use source. A directory scan covers every kind it finds: JS/TS/JSX/TSX, Angular templates (.html fragments and inline template: strings) and full HTML pages (rendered and checked with axe).
| Option | Description |
|---|
--json | Print findings as a JSON array |
--fail-on <impact> | Exit 1 if any finding is at or above minor, moderate, serious or critical (default minor) |
--tags <list> | Comma-separated axe tags, e.g. wcag2aa,wcag22aa (web only) |
--wait-for <css> | Wait for this selector before scanning (web only) |
--changed | Scan only source files changed since HEAD plus new files. Targets, if given, limit the search. Fast for CI and for rescans after a fix |
Exit codes: 0 ok, 1 findings at or above the threshold, 2 usage or runtime error. Notes about skipped files go to stderr as Warning: ..., so --json output stays parseable.
Each finding looks like this:
{
"engine": "web",
"ruleId": "image-alt",
"impact": "critical",
"wcag": ["wcag2a", "wcag111"],
"message": "Images must have alternative text",
"helpUrl": "https://dequeuniversity.com/rules/axe/4.14/image-alt",
"fixHint": "Add alt=\"<description>\" to the image, or alt=\"\" if it is purely decorative.",
"selector": "img",
"html": "<img src=\"a.png\">"
}
Source findings have file and line instead of selector and html. Web findings also carry url (the page scanned) or, for a local HTML file, file, so a multi-page scan stays readable.
Frameworks