AccessProof Fix
OfficialREADME.md
# AccessProof Fix
Find the accessibility problems on your site, see the exact element and WCAG rule for each, and get a fix you or
your coding agent can apply. It runs in your terminal, in GitHub pull requests, and inside Claude Code, Cursor or any
MCP client.
It drives a real Chromium browser and checks each page with [axe-core](https://github.com/dequelabs/axe-core) against
WCAG 2.2 A and AA. Free and open source under AGPL v3.
## Quick start
```sh
npx playwright install chromium # once, to get the browser
npx accessproof-fix scan https://your-site.com
npx accessproof-fix scan dist # a built site folder, served on 127.0.0.1 for the scan
npx accessproof-fix scan localhost:3000
```
What you get:
```text
CRITICAL image-alt: Images must have alternative text (WCAG 1.1.1, level A)
Fix: Add an `alt` attribute that says what the image shows, or `alt=""` if it is only decoration.
* img[src$="bouquet.svg"]
<img src="bouquet.svg">
SERIOUS color-contrast: Elements must meet minimum color contrast ratio thresholds (WCAG 1.4.3, level AA)
Fix: Darken the text or lighten the background until the contrast ratio is at least 4.5 to 1 (3 to 1 for large text).
* p:nth-child(3)
<p style="color:#aaaaaa;background:#ffffff">Order before noon for same-day delivery.</p>
```
The command exits with 1 when it finds problems at or above `--fail-on` (serious by default), so it can gate any CI.
## In pull requests
Add `.github/workflows/accessibility.yml`:
```yaml
name: Accessibility
on: pull_request
permissions:
contents: read
pull-requests: write
jobs:
accessibility:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 22
- run: npm ci
- run: npm run build
- uses: accessproofhq/accessproof-fix@v0
with:
serve: dist
urls: |
/
/pricing.html
```
Each run writes the report to the job summary and keeps one comment on the pull request up to date. To scan a preview
deploy instead of a build, leave out `serve` and list full addresses in `urls`.
| Input | Default | What it does |
|---|---|---|
| `urls` | | Pages to scan, one per line or comma separated |
| `serve` | | Built site folder to serve; `urls` become paths in it |
| `fail-on` | `serious` | `critical`, `serious`, `moderate`, `minor` or `none` |
| `baseline` | | Baseline file; known problems in it do not fail the check |
| `comment` | `true` | Comment the report on the pull request |
| `github-token` | `github.token` | Token used for the comment |
On pull requests from forks the token cannot comment, so the report stays in the job summary.
## With your coding agent
The MCP server lets an agent scan, read the fixes, change your code and scan again until the page is clean.
Claude Code:
```sh
claude mcp add accessproof-fix -- npx -y accessproof-fix mcp
```
Cursor, Windsurf and other MCP clients:
```json
{
"mcpServers": {
"accessproof-fix": { "command": "npx", "args": ["-y", "accessproof-fix", "mcp"] }
}
}
```
Then ask: "Scan localhost:3000 for accessibility problems and fix them."
| Tool | What it does |
|---|---|
| `scan_accessibility` | Scans up to 20 addresses, or folders and HTML files inside the project, and returns each problem with a fix |
| `explain_rule` | Explains an axe-core rule, its WCAG criterion and how to fix it |
For agents, scans run one at a time and stay inside the project folder. Private network addresses (such as
192.168.x.x and cloud metadata at 169.254.169.254) are refused; localhost stays allowed for your dev server.
## Adopting it on an older site
A baseline records today's problems so the check fails only on new ones while you work through the old list:
```sh
npx accessproof-fix baseline dist --out .accessproof-baseline.json
npx accessproof-fix scan dist --baseline .accessproof-baseline.json
```
Commit the file and pass it to the Action with `baseline: .accessproof-baseline.json`. Entries match on the page
path, so a preview deploy matches production.
## Command line
```text
accessproof-fix scan <target...> [options]
accessproof-fix baseline <target...> --out <file>
accessproof-fix mcp
--serve <dir> Serve this folder; targets such as /about.html are paths inside it
--format <format> text (default), json or markdown
--fail-on <impact> critical, serious (default), moderate, minor or none
--baseline <file> Hide the known problems recorded in this baseline file
--out <file> Write the report (or the baseline) to this file
--timeout <sec> Page load timeout in seconds (default 30)
```
Exit codes: 0 nothing at or above `--fail-on`, 1 problems found, 2 could not run.
## What it can and cannot tell you
- Automated checks find only part of accessibility problems. A manual review with a keyboard and a screen reader is
still needed, and nothing automated can show that a site meets WCAG. This tool never claims it does.
- It checks the top frame of each page. Content inside iframes is not checked.
- Pages behind a login need a reachable address, such as a preview deploy or a local build.
- Text copied from scanned pages (selectors, HTML, titles) is treated as untrusted: it stays inside code blocks in
comments, is quoted and labelled as data for agents, and has control characters removed in terminal and CI logs.
- Checks run in a separate browser world the page's scripts cannot reach, so a page cannot fake its own results. A
page that hangs is stopped after 60 seconds.
- Chromium runs in its sandbox. Where the machine does not allow it (some Linux containers and CI runners), the
tool says so and runs without it, so scan only sites you would open in a browser on that machine.
- The private network block for agents checks each request and the address a page ends on. It cannot see a domain
whose DNS answer changes between the check and the browser's own lookup.
- When serving a local folder, hidden files such as `.env` are never served, and only requests addressed to
127.0.0.1 are answered.
## Need more than a scan?
AccessProof also runs hosted monitoring with a dated evidence record, and fixes sites for teams who want it done for
them: [accessproofhq.vercel.app](https://accessproofhq.vercel.app).
## Contributing
```sh
npm ci
npx playwright install chromium
npm run check # types, lint, build and tests, including real browser scans of examples/
```
## Licence
[AGPL v3](LICENSE). Scanning your site with it does not change your site's licence. If you change this tool and offer
it to others as a network service, share your changes under the same licence.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues