Skip to main content
Glama

a11y-toolkit: Rendered WCAG audit

a11y_audit_dom
Read-onlyIdempotent

Run rendered WCAG audits on JavaScript-heavy pages with local Playwright to check computed contrast, target size, focus indicators, and accessible names, returning scored findings with remediation.

Instructions

Deep RENDERED WCAG audit via local Playwright/Chromium: real computed text contrast against effective backgrounds with alpha compositing (1.4.3), pixel-sampled measurement of text over images/gradients (background captured with the text transparent), minimum target size 24×24 (2.5.8, new in WCAG 2.2), visible focus indicator heuristic (2.4.7), plus rendered versions of the static checks (alt, accessible names, labels, headings, lang/title, tabindex, aria-hidden, captions, tables). Findings include remediation. HTTP contract: the report carries http_status, its url is the FINAL page after redirects (requested_url keeps the original), and a 4xx/5xx response is returned as an error — the audited content still rides along, but no CI gate can pass on an error response. Requires playwright: pip install playwright && playwright install chromium. — Use instead of a11y_audit_url on JS-heavy pages; needs local Playwright. Returns JSON: {mode, url, score 0-100, findings [{criterion, severity, signal, issue, remediation}], summary, score_note} — same shape as the static audit.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "a11y_audit_dom"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesPage URL to load in Chromium (http/https or file:// for local fixtures)
langNoOutput language for findings and remediation (default en)
targetNoEN 301 549 target: web=9.x clauses (default), documents=10.x, software=11.x
browserNoBrowser engine (auto = detect the first available)
timeoutNopage load timeout seconds (45 default)
standardNoadd the EN 301 549 V4.1.1 (2026) clause to every finding plus a standard block
auth_stateNoPath to a Playwright storage_state JSON (exported session) to audit behind login — local file, never uploaded
color_schemeNoEmulate prefers-color-scheme: run the contrast pass in dark mode too — dark themes fail where light passes (nobody audits both)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv5.27.0
    • addedInput schema / properties / standard
      Added value: +{
      +  "description": "add the EN 301 549 V4.1.1 (2026) clause to every finding plus a standard block",
      +  "enum": [
      +    "en301549"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / target
      Added value: +{
      +  "description": "EN 301 549 target: web=9.x clauses (default), documents=10.x, software=11.x",
      +  "enum": [
      +    "web",
      +    "documents",
      +    "software"
      +  ],
      +  "type": "string"
      +}
  2. Changed1 schema field changedv5.8.0
    • addedInput schema / properties / color_scheme
      Added value: +{
      +  "description": "Emulate prefers-color-scheme: run the contrast pass in dark mode too — dark themes fail where light passes (nobody audits both)",
      +  "enum": [
      +    "light",
      +    "dark"
      +  ],
      +  "type": "string"
      +}
  3. Changed1 schema field changedv5.6.0
    • removedInput schema / browser
      Removed value: -{
      -  "description": "Browser engine (auto = detect the first available)",
      -  "enum": [
      -    "auto",
      -    "chromium",
      -    "firefox",
      -    "webkit",
      -    "chrome",
      -    "msedge"
      -  ],
      -  "type": "string"
      -}
  4. Changed1 schema field changedv5.5.0
    • addedInput schema / properties / browser
      Added value: +{
      +  "description": "Browser engine (auto = detect the first available)",
      +  "enum": [
      +    "auto",
      +    "chromium",
      +    "firefox",
      +    "webkit",
      +    "chrome",
      +    "msedge"
      +  ],
      +  "type": "string"
      +}
  5. Changed4 schema fields changedv4.0.0
    • addedInput schema / browser
      Added value: +{
      +  "description": "Browser engine (auto = detect the first available)",
      +  "enum": [
      +    "auto",
      +    "chromium",
      +    "firefox",
      +    "webkit",
      +    "chrome",
      +    "msedge"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / auth_state
      Added value: +{
      +  "description": "Path to a Playwright storage_state JSON (exported session) to audit behind login — local file, never uploaded",
      +  "type": "string"
      +}
    • addedInput schema / properties / lang / description
      Added value: +"Output language for findings and remediation (default en)"
    • addedInput schema / properties / url / description
      Added value: +"Page URL to load in Chromium (http/https or file:// for local fixtures)"
  6. Addedv3.3.0

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive, yet the description adds genuinely new behavior: the HTTP contract (http_status in the report, url is the final page after redirects while requested_url keeps the original, 4xx/5xx returned as errors with content still attached), the local-only handling of auth_state, and the option to run the contrast pass in dark mode. The only shortfall is that it never mentions rate limits, runtime cost, or what happens on timeout despite exposing a timeout param.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and dependency are front-loaded in the first sentence, and the closing sentence supplies the return shape and the 'same shape as the static audit' consistency note. The middle is parenthetical-dense (criterion numbers, a wry aside) and could be tightened, but no sentence is purely redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description compensates by naming the return keys (mode, url, score 0-100, findings with criterion/severity/signal/issue/remediation, summary, score_note) and by tying the shape to the static audit. Combined with the install prerequisite, HTTP contract, and redirect semantics, an agent has everything needed to invoke and interpret this 8-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description still adds decision-relevant meaning: why color_scheme matters ('dark themes fail where light passes — nobody audits both') and that auth_state is a local file never uploaded. It does not explain lang/target/standard interactions beyond what the enum descriptions already say, so it is an incremental rather than a comprehensive gain.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource: 'Deep RENDERED WCAG audit via local Playwright/Chromium', then enumerates the distinctive checks (computed contrast with alpha compositing 1.4.3, pixel-sampled text-over-image, 2.5.8 target size, 2.4.7 focus heuristic) plus the rendered static checks. It also names the sibling it replaces ('Use instead of a11y_audit_url'), so an agent can distinguish it without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States the selecting condition explicitly: use this instead of a11y_audit_url on JS-heavy pages, and that local Playwright is required with the exact install command. It also flags the CI implication of a 4xx/5xx (error response, no gate can pass), which shapes when an agent should treat a run as a failure rather than a result.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.