Skip to main content

a11y-toolkit

WCAG 2.2 accessibility checks for coding agents, developers and CI.

An automated check finds some of the accessibility problems and stops there. a11y-toolkit keeps going: audit an HTML file or a live page, find out how to fix each issue, and check what changed before you ship. When a human needs to review the result, export a verifiable evidence pack with the findings and the checks that still need attention.

Free to run yourself under the MIT license. Built by Jesús Quintana Fernández, who has been auditing websites for accessibility since 2003, and used by a11y.es for hosted monitoring.

English · Español

CI PyPI npm Downloads License: MIT MCP Sponsor Socket score OpenSSF Scorecard OpenSSF Best Practices ACT Rules Releases Dependencies Python Versions GitHub Release

Human in the Loop

Python 3.9+ · Zero dependencies at the core · Zero telemetry · English and Spanish output

Quickstart

Try the CLI

Run a local contrast check with uvx. The expected ratio is 4.54:1. uv tool guide

uvx --from a11y-toolkit a11ytoolkit pair "#767676" "#ffffff"

Install the CLI with uv tool install a11y-toolkit or run python -m pip install a11y-toolkit in your project's Python environment. Then audit a public page or pass --file page.html to audit local HTML.

a11ytoolkit audit --url https://example.com

Each finding includes a WCAG criterion, severity and remediation. Check not_measured for the criteria that this audit did not measure. Run a11ytoolkit route --url https://example.com to see what to check next. The CLI writes UTF-8 on every platform, so a report sent to a file or a pipe (> report.json) is a valid file on Windows too.

Watch an audit, a contrast fix and a re-audit

An audit flags an image without alt text and a form field without a label. A contrast check suggests a darker text color, and the re-audit after the fixes shows the improvement.

Connect your coding agent

mcp-name: io.github.kinti/a11y-toolkit

Register a stdio MCP server with the command and arguments below. Use the configuration format supported by your client. Client setup guide

command: uvx
args: --from a11y-toolkit a11y-toolkit-mcp

For the npm launcher, use npx -y -p @kinti/a11y-toolkit a11y-toolkit-mcp. It bundles the engine and uses a local Python 3.9+ interpreter. Install options

The npm workflow uses GitHub OIDC. The official MCP entry is registered once PyPI and npm both serve that version. Release workflow

Once connected, ask your agent to call a11y_contrast_pair for #767676 on #ffffff. The expected contrast ratio is 4.54:1.

Enable browser checks

Use the same Python environment for Playwright and the CLI or MCP server. Install Chromium for browser checks and Pillow for image decoding in pixel-based contrast checks.

python -m pip install a11y-toolkit playwright pillow
python -m playwright install chromium
a11ytoolkit dom https://example.com

The CLI has no browser option and uses the first engine it finds. Choose the engine with the browser argument of the MCP tools. If your MCP client uses an isolated uvx environment, launch it from the browser-enabled environment instead. Set its command to that environment's a11y-toolkit-mcp executable. Rendered checks also support installed Firefox, WebKit, Chrome and Edge.

Closed <details> content is no longer reported as unnamed or unfocusable. a11y_snapshot can run right after a browser audit in the same session, and a11y_contrast_dom returns a load timeout as an error object. When load exceeds the timeout but the DOM is complete, a11y_audit_dom audits the rendered page and lists it in page_errors; raise timeout for slow sites. Rendered findings carry count, the total number of instances (examples are capped at 6).

From a finding to a verified fix

Locate the issue and recheck it

Run these commands on the same local HTML file. The annotated copy marks the elements the report can locate in the original source, and marks.json lists the path of each marked element.

a11ytoolkit audit --file page.html > audit.json
a11ytoolkit annotate page.html --report audit.json -o annotated.html --marks marks.json

Apply the remediation in page.html, then repeat the audit. For text contrast, a11ytoolkit pair "#767676" "#ffffff" measures the color pair and reports the thresholds. Use a rendered check for text over images and gradients.

Block regressions in CI

Start with an audit of the page you want to track. The budget records the findings you have already accepted. Commit the budget so CI can use it as a baseline.

a11ytoolkit budget --init --audit audit.json > budget.json

After the next change, audit the same file again and compare it with the saved budget.

a11ytoolkit audit --file page.html > next.json
a11ytoolkit budget --budget budget.json --audit next.json
Exit Result
0 The measured changes are within budget.
1 The capture failed or the reports could not be compared.
2 At least one finding exceeded the budget.

Keep browser, color scheme and session type consistent when comparing live captures. To check changed HTML in a Git branch, use a11ytoolkit audit --changed --base origin/main. To compare focus order in a scripted journey, use trace. CI and keyboard recipes

a11ytoolkit trace https://mysite --script journey.json --capture-dialog-state -o after.json
a11ytoolkit trace diff before.json after.json --gate-dialog-state

--capture-dialog-state records, after each step, whether a dialog is open and whether focus is inside it. trace diff --gate-dialog-state compares that state when both traces carry it.

Budgets match instances by stable_paths (id, data-testid, ARIA name) before positional paths. In a crawl, failed URLs do not spend the page quota; the crawl stops after failures reach twice the quota and the report says so with failed_pages_capped.

a11ytoolkit init also installs a write-time gate in .claude/settings.json. guard fails closed: a save the engine cannot audit (over 3 MB, unparseable) returns decision: "error" and exit 1 instead of allow; A11Y_GATE=off bypasses the hook and --lang es answers in Spanish. fix returns error when its final audit fails. To re-verify a report, a11y_disprove checks each earlier finding on the live page; with fewer saved paths than instances it confirms only a signal still on the same page and rejects only with complete proof.

Hand off the evidence

a11ytoolkit evidence next.json -o evidence-pack.json

An evidence pack includes the source reports, a 55-criterion matrix and the review still required on the sample. From a checkout of this repository, run python3 scripts/verify_pack.py /path/to/evidence-pack.json to check the SHA-256 seal and embedded reports. An auditor can review the pack and take responsibility for the conformance decision. Pack format and verifier

Test a real task blindfolded

Scanners check what a page is made of. This checks what a person can do with it. Your coding agent attempts a real task ("subscribe to the newsletter", "reset the password") perceiving only the accessibility tree, which is what a screen reader exposes, and acting only by accessible name and keyboard. Every point of friction it meets is logged against a WCAG criterion.

Watch an agent try to subscribe to a newsletter and give up

A coding agent tries to subscribe to a newsletter perceiving only the accessibility tree, logs a friction point at each obstacle, and a11y_journey_verdict returns a blocked verdict with every finding, its criterion and remediation.

The demo page is authored to fail, and the verdict shown is real output for that walk.

Ask your agent to run the blindfold-task prompt with a URL and the task. When it finishes, it closes with a11y_journey_verdict, which turns the friction log into a deterministic verdict: pass, partial, fail or blocked, a score, and each finding with its criterion and remediation. To price a log by hand, run python3 -m a11y_toolkit.a11yjourney friction.json. The verdict is a report like the audits, so a11y_evidence accepts it and the friction list reaches the person who reviews.

A pass means one task was completable non-visually by an AI agent on one page. That is usability evidence. It is not a conformance claim and it does not replace testing with a human screen-reader user. The worked example shows the whole loop, on a failing fixture and on two live sites.

Choose the right check

If you need to… Start with…
Scan a page, local HTML or a small site audit --url, audit --file or audit --url … --pages 5
Check rendered contrast, focus or small targets dom or contrast-dom
Walk a keyboard route or check a layout at 320 CSS pixels kbd, trace or reflow
Check interactive behavior such as errors, hover or infinite scroll forms, hover, scroll or patterns
Find out whether a task can be completed without seeing the page Prompt blindfold-task, then a11y_journey_verdict
Inspect what a browser exposes to assistive technology MCP tool a11y_sr_transcript or prompt blindfold-task
Screen documents or captions pdf, python -m a11y_toolkit.a11ydocx or vtt
Prepare a human review or an interoperability export evidence, scope, sarif, earl, vpat or openacr

Form checks can submit test data. Run them against a test site or an environment where submissions are expected. Examples and command options

Coverage and validation

48 of 55 A/AA criteria carry at least one automated signal (87%) in the supported WCAG 2.2 check modes. A signal covers a specific condition within a criterion. Any signal counts, even a partial one: a criterion appears in this count as soon as one of its conditions is checked, which says nothing about the others. The sample, the selected checks and the manual review determine what a reviewer can conclude about conformance. The evidence pack shows those distinctions criterion by criterion. Manual review checklist · Standards and mappings

Evidence What it measures
ACT implementation report 34 of the 37 W3C ACT rules approved today are implemented completely, by the W3C consistency algorithm: across 694 official test cases, no conforming case is flagged and 213 of 224 expected failures are detected. The other 3 rules are partial: they need to judge the content (a descriptive title, a descriptive image name, text inside an image), so the engine asks one question per element and a11y_oracle records the answer with its evidence. 6 of 42 proposed rules are complete. Regenerated on 2026-11-29 against w3c/wcag-act-rules 4ce3d61.
Frozen corpus The toolkit detected all 18 injected faults and flagged none of the three controls. These cases come from the toolkit's own mutation bank. Other engines can submit results to the same scorer.
Live axe-core benchmark Four public pages compared across static, rendered and axe passes. Differences identify cases for manual review. Raw results and the validation procedure are public.

The score is 100 minus 12, 6 or 2 points for each high, medium or low finding. It ranks what the automated checks saw; it is not a share of WCAG. Python callers can turn it into a level with compute_verdict(findings, score): one of serious_findings, clean, high_score or needs_improvement, where clean only means no automated findings. What requires judging the content comes out as a question; a11y_oracle records the answer with its evidence.

Review ACT questions

a11ytoolkit audit --url https://example.com > audit.json

Pass the static report to the MCP tool a11y_oracle with answers containing question_id, answer (yes or no) and an observation of the content. Image questions cover images with src, image buttons and URLs in inline CSS backgrounds. Visual inspection remains the reviewer's job.

scripts/act_report.py --answers imports sealed answers for the same URL, source hash and questions. Unanswered or omitted image questions keep a case at cantTell unless a reviewed image already fails. Failed captures are untested and the generator exits 1. MCP reference

For browser-based transcripts, the browser's accessibility tree is the source. Use a real screen reader for spoken-output verification. Screen-reader cross-check

MCP tools and prompts

The project ships 38 MCP tools, 5 prompts and a skill for repeatable audits and review. The CLI also includes regression and corpus commands. Agent skill · Agent documentation index

Browse the 38-tool catalog

The tools (38)

Full reference — descriptions, arguments, return shapes and behavior — in docs/tools.md. All tools accept lang (en|es) unless noted; output is JSON unless noted. Generated from server.TOOLS by scripts/gen_readme.py.

Tool Category What it does
a11y_audit_url Audit Express WCAG audit
a11y_audit_dom Audit Rendered WCAG audit
a11y_audit_pdf Audit PDF accessibility screening
a11y_docx_screen Audit DOCX accessibility screening
a11y_locate Locate Locate element by accessible name
a11y_journey_verdict Blindfold testing Blindfold journey verdict
a11y_autofix Fix & contrast Deterministic safe auto-fixes
a11y_patches Fix & contrast Sealed patch-set (sha-keyed)
a11y_contrast_pair Fix & contrast Contrast ratio + verdicts
a11y_contrast_image Fix & contrast Text-over-image contrast
a11y_contrast_dom Fix & contrast Live-element contrast sampling
a11y_suggest_color Fix & contrast Nearest passing color
a11y_generate_declaration Document Accessibility statement (EAA/RD 1112)
a11y_generate_vpat Document VPAT 2.5 report (WCAG edition)
a11y_generate_openacr Document OpenACR YAML report (GSA)
a11y_badge Document Honest SVG badge
a11y_snapshot Watch (regressions) A11y snapshot + tab order
a11y_diff Watch (regressions) Snapshot regression diff
a11y_diff_urls Watch (regressions) Staging vs production diff
a11y_aria_live_snippet Watch (regressions) aria-live monitor snippet
a11y_criterion Knowledge & context WCAG criterion explained
a11y_html_validate Knowledge & context W3C Nu validation
a11y_keyboard Interactions Keyboard-trap + skip-link landing detector
a11y_forms Interactions Form error testing
a11y_hover Interactions Hover dismissibility (1.4.13)
a11y_reflow Interactions 320px reflow check
a11y_scroll Interactions Infinite-scroll audit (passive by default; interactive=true clicks the exact control you name)
a11y_sr_transcript Interactions Screen reader transcript
a11y_reduced_motion Interactions prefers-reduced-motion honored?
a11y_forced_colors Interactions forced-colors survival heuristic
a11y_vtt_check Interactions WebVTT caption quality
a11y_evidence Coverage & evidence Evidence pack (verifiable handoff)
a11y_disprove Coverage & evidence Disprover: re-verify findings
a11y_ledger Coverage & evidence Coverage ledger (persistent)
a11y_wcag3_preview Coverage & evidence WCAG 3 draft preview (no score)
a11y_scope Coverage & evidence Applicability scope (semi-automatic)
a11y_oracle Coverage & evidence Oracle record (engine asks, someone answers)
a11y_route Routing Tool router (goal or page to steps)

The 5 prompts

Prompt Use it to…
audit-page Audit a page and plan keyboard, screen-reader and zoom checks.
fix-contrast Find and apply a passing text color for the measured background.
pre-deploy-check Audit a URL and compare it with a saved accessibility snapshot.
declaration-eaa Draft an accessibility statement for human review.
blindfold-task Attempt a task using accessible names and keyboard actions, then record the friction.

Data and security

The toolkit runs as your local user. Local file arguments can read or write files that user can access. URL and browser checks contact the pages you specify. The optional Nu HTML validation tool sends the selected URL or HTML to its configured validator. Keep authenticated browser session files local. Security policy and private reporting

Contribute

Run make test from the repository root. Install Playwright and Chromium to exercise the browser suites. The tool inventory and agent index derive from the MCP definitions, and CI checks that they stay in sync. Architecture · Changelog

Fix a bug, improve a recipe or add a locale. Locale packs can be validated with python3 tests/test_locales.py. Translation guide · Good first issues · Discussions

About

I have been auditing websites for accessibility since 2003. I built this toolkit so the person fixing an issue can find it and the person reviewing the fix can check the evidence. If a result surprises you, share the smallest page that reproduces it. Jesús Quintana Fernández · Report an issue

The toolkit is used by a11y.es for hosted accessibility monitoring. a11y.es

The code is MIT-licensed. Modified distributions use their own name and branding. License

Metadata

Release files for a11y-toolkit 5.38.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for a11y-toolkit 5.38.0
File Size Uploaded Provenance Actions
a11y_toolkit-5.38.0.tar.gz 587.2 kB With provenance Details for a11y_toolkit-5.38.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for a11y-toolkit 5.38.0
File Interpreter ABI Platform Actions
a11y_toolkit-5.38.0-py3-none-any.whl Python 3 none any Details for a11y_toolkit-5.38.0-py3-none-any.whl

Total release size: 1.1 MB

Release files / a11y_toolkit-5.38.0.tar.gz

Download URL a11y_toolkit-5.38.0.tar.gz
Size 587.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4c9e4b89bc08e8938a7e504be742774e2f969e9b7435a1f11f35b738c53335c6
BLAKE2b-256 checksum
How to use checksums
d76ac3ac56e9bdc8f923bc6a7b42968916749eb8a561b677b8037830438ce2cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / a11y_toolkit-5.38.0-py3-none-any.whl

Download URL a11y_toolkit-5.38.0-py3-none-any.whl
Size 513.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93420f5d052d6c131c26014f6581c96310c92c6d77d93759196b0dedfd43ab3e
BLAKE2b-256 checksum
How to use checksums
9ba8e92ab71b4aa52318a52393b445586a208014233bf32c7c415b2f874ca4ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for a11y-toolkit 5.38.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for a11y_toolkit-5.38.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

5.38.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page