Skip to main content

a11y-toolkit — the accessibility layer for AI coding agents

CI PyPI License: MIT Python 3.9+ MCP Smithery

12 MCP tools + 5 prompts + a skill that give any AI agent (Claude, Cursor, Windsurf, Codex…) the full WCAG 2.2 loop: audit → fix → document → watch. Zero dependencies at its core; every finding ships with a concrete remediation your agent can apply.

Accessibility is not optional anymore: the European Accessibility Act is in force since June 2025, ADA suits keep landing, and AI agents now write most of the web. This toolkit makes "is it accessible?" a one-question ask — and "then fix it" a one-command job.

What no other a11y tool gives an agent

Capability axe-core / Lighthouse / pa11y a11y-toolkit
Text contrast over images/gradients (pixel sampling of the real background, hostile-zone grid)
Legal accessibility statements (EAA / RD 1112/2018), accessible HTML, es/en
Regression watch between builds: accessible names + real tab-order diff
Remediation text per finding, written for an agent to apply
Focus-order regression detection
Runs with zero dependencies (stdlib only; Playwright optional for the deep pass) heavy runtimes
Screen-reader aria-live announcement monitor
0-100 score computed from weighted findings ✓ (Lighthouse, subset of rules) ✓ (fuller rule set)
Criterion explanations on demand for agents
Static core parity: ARIA validity, autocomplete 1.3.5, link purpose, duplicate ids
Output optimized for MCP/LLM consumption (JSON, severity-ranked, es/en)

The tools (10)

Tool What it does
a11y_audit_url Express static WCAG audit of a URL or raw HTML: 20+ signals with a weighted 0-100 score (alt, accessible names, labels, autocomplete 1.3.5, keyboard onclick, unknown ARIA roles, broken aria-labelledby, unnamed duplicated landmarks, meta refresh, skip mechanism, lang validity, title, headings, blocked zoom, captions, autoplay audio, generic/duplicated link text, target=_blank warnings, tabindex>0, aria-hidden-on-focusable, tables, duplicate ids, accesskeys). Per-finding remediation.
a11y_audit_dom Rendered audit (local Playwright/Chromium): real computed text contrast vs effective backgrounds with alpha compositing (1.4.3), minimum target size 24×24 (2.5.8 — new in WCAG 2.2), focus-indicator heuristic (2.4.7), all static checks on the live DOM.
a11y_contrast_pair Exact ratio + verdicts 1.4.3/1.4.6/1.4.11. Accepts #hex, rgb(), hsl(), CSS color names; alpha composites over the background. Suggests the nearest passing color.
a11y_contrast_image Text over images: pixel-level sampling of the actual background → worst/median/p95 ratio, % area passing AA, hostile-zone detection on a 3×3 grid.
(rendered audit) adds :focus/:hover state contrast (disabled exempt) and same-origin iframes
a11y_suggest_color Nearest opaque color (true RGB distance) reaching the target ratio (4.5 default).
a11y_generate_declaration Legal accessibility statement in HTML: RD 1112/2018 art. 10 (Spanish public sector) or European Accessibility Act wording (Directive (EU) 2019/882 / Ley 11/2023). es/en. The document is itself accessible.
a11y_snapshot Interactive elements (tag, role, accessible name, href) + real tab focus order + the computed accessibility tree (what a screen reader announces). Requires Playwright.
a11y_diff Regression diff between two snapshots: added/removed/renamed interactives, focus-order changes.
a11y_diff_urls Snapshot two URLs and diff in one call (staging vs production).
a11y_aria_live_snippet Injectable monitor logging every aria-live announcement (time, politeness, role, text) — what a screen reader would say, visible on screen.
a11y_criterion Explains any WCAG 2.2 criterion in plain language: what it requires, typical failures, and which toolkit tool verifies it.
a11y_badge Returns an honest badge as accessible SVG: score, date, scope ("automated screening"), never "conformant" — the anti-overclaim seal.

Prompts (slash-commands in supporting clients): audit-page (full audit workflow + what automation can't check), fix-contrast, pre-deploy-check (audit + diff → GO/NO-GO), declaration-eaa (collects legal fields, generates).

Install

Registry name: mcp-name: io.github.kinti/a11y-toolkit · PyPI: a11y-toolkit

Claude Code (one command):

claude mcp add a11y-toolkit -- uvx --from a11y-toolkit a11y-toolkit-mcp

Any MCP client with JSON config (Claude Desktop, Cursor, Windsurf, VS Code…):

{
  "mcpServers": {
    "a11y-toolkit": {
      "command": "uvx",
      "args": ["--from", "a11y-toolkit", "a11y-toolkit-mcp"],
      "timeoutMs": 60000
    }
  }
}

Or from the repo without publishing:

{ "mcpServers": { "a11y-toolkit": {
    "command": "uvx", "args": ["--from", "git+https://github.com/kinti/a11y-toolkit", "a11y-toolkit-mcp"] } } }

The rendered audit, snapshots and diffs use Playwright if present (pip install playwright && playwright install chromium); everything else works with zero dependencies.

The skill (teaches your agent when/how to use all of this)

git clone https://github.com/kinti/a11y-toolkit && cd a11y-toolkit
./skill/install-skill.sh     # → ~/.zcode/skills and ~/.claude/skills

CLI — same engine, one command

a11y pair "#1f2328" "#fbfaf7"                     # contrast, per-criterion verdicts
a11y image hero.jpg --text "#ffffff" --region 120,40,420,90
a11y audit --url https://example.com --lang en    # express static audit
a11y declaration --entidad "Acme" --url https://acme.example \
       --estado parcial --marco eaa --lang en --output decl.html
a11y snapshot https://mysite --out before.json    # before deploy (needs Playwright)
a11y diff before.json after.json                  # after deploy

Run from a clone with python3 a11y.py <subcommand>; from PyPI with uvx --from a11y-toolkit a11y ….

Watch it continuously (the deployment gate)

a11y audit --url https://mysite --pages 5 > audit.json        # light crawl
python3 -m a11ybudget --init < audit.json > budget.json       # accept today's baseline
a11y budget --budget budget.json --audit audit.json           # only NEW findings block (exit 2)
a11y sarif --from-audit audit.json -o a11y.sarif              # GitHub code scanning format

examples/a11y-watch.yml turns this into a weekly scheduled check that fails on regressions and publishes the SARIF to code scanning.

Honesty, built in

Automation covers ~1/3 of WCAG — every audit says so. The audit-page prompt and the bundled skill then have the agent check what it can (keyboard operability, focus visibility, zoom reflow, announced errors) using the manual checklist, and recommend a screen-reader pass for the rest. A filter, not a verdict.

Security & scope

A local tool: runs on your machine as your user. path (image) and output_path (statement) read/write local paths — use it in MCP clients you trust. Nothing leaves your machine except the URL you explicitly audit.

Development

python3 test_contrast.py && python3 test_audit.py && python3 test_dom.py && python3 test_mcp.py

test_dom.py self-skips without Playwright. Releases: tag vX.Y.Z → CI publishes to PyPI (trusted publishing); server.json is the official MCP Registry manifest. Listed on Smithery too. Contributions welcome — see CONTRIBUTING.md (the golden rules: zero dependencies at the core, es/en strings everywhere, honest scope notes).

Roadmap

  • Rendered audit (computed contrast, target size 2.5.8, focus indicator)
  • 0-100 weighted score · ARIA validity · criterion explanations
  • Computed accessibility tree in snapshots + tree diff
  • SARIF export → findings as GitHub code-scanning / PR annotations (a11y sarif)
  • Honest dated badge as accessible SVG (a11y_badge)
  • Accessibility error budget: only NEW findings block (a11y budget + examples/a11y-watch.yml)
  • Multi-page same-domain crawl with aggregated scores (pages parameter)
  • Scheduled surveillance recipe (weekly audit + budget gate as a GitHub Action)
  • WCAG-EM conformance ladder (conformance-wcagem prompt + guided protocol)
  • Same-origin iframes in the rendered audit + :focus/:hover state contrast

Author

Jesús Quintana Fernández (jquin.net) — SEO/GEO consultant and web-accessibility practitioner since 2003. MIT © 2026.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

a11y_toolkit-3.3.1.tar.gz (62.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

a11y_toolkit-3.3.1-py3-none-any.whl (67.9 kB view details)

Uploaded Python 3

File details

Details for the file a11y_toolkit-3.3.1.tar.gz.

File metadata

  • Download URL: a11y_toolkit-3.3.1.tar.gz
  • Upload date:
  • Size: 62.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for a11y_toolkit-3.3.1.tar.gz
Algorithm Hash digest
SHA256 3291080a9266c8c80002309e48fe79361dc9773bed40c12d887e535917627558
MD5 a6ca117f3980783da1f5aa74af3883de
BLAKE2b-256 ac1da1a15e76dcad5942956dafb9c4ce0a31585633d00e327176142310637c46

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11y_toolkit-3.3.1.tar.gz:

Publisher: publish.yml on kinti/a11y-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11y_toolkit-3.3.1-py3-none-any.whl.

File metadata

  • Download URL: a11y_toolkit-3.3.1-py3-none-any.whl
  • Upload date:
  • Size: 67.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for a11y_toolkit-3.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 31c08f037f6dffd12ee49911d455e2fbb2dd5877845f560cee0f2b6d8248f84b
MD5 6e578dd3384b34863425ab23ee32f908
BLAKE2b-256 08901518b805c95ec2247a57c4892ff3655a1b65ad56d5a7e2e903c296084f90

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11y_toolkit-3.3.1-py3-none-any.whl:

Publisher: publish.yml on kinti/a11y-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

3.3.3

2 files

3.3.2

2 files

This release

3.3.1 This release

2 files

3.3.0

2 files

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