Skip to main content
Glama

a11y-toolkit: Rendered WCAG audit

a11y_audit_dom
Read-onlyIdempotent

Audit rendered web pages for WCAG compliance using Chromium, measuring real contrast and target sizes to find issues static checks miss.

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. 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.

Input Schema

NameRequiredDescriptionDefault
urlYesPage URL to load in Chromium (http/https or file:// for local fixtures)
langNoOutput language for findings and remediation (default en)
browserNoBrowser engine (auto = detect the first available)
timeoutNopage load timeout seconds (45 default)
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. 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"
      +}
  2. 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"
      -}
  3. 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"
      +}
  4. 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)"
  5. Addedv3.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, idempotent, non-destructive, openWorld), and the description adds substantial behavior beyond them: the Playwright/Chromium dependency and install step, local-only processing of the auth_state session ('local file, never uploaded'), and the exact rendering methodology (background captured with text transparent). This is exactly the kind of context annotations cannot carry.

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?

Front-loads what the tool does, then the dependency requirement, then the routing guidance, then the return shape — a sensible order. The opening sentence is a dense run-on enumerating checks, which costs some readability, but every sentence carries information.

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 spelling out the return shape ({mode, url, score 0-100, findings [{criterion, severity, signal, issue, remediation}], summary, score_note}) and noting it matches the static audit. For a six-parameter tool with a heavy runtime dependency, the definition is complete enough to invoke correctly.

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

Parameters3/5

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

Schema description coverage is 100% with six well-documented parameters, so the schema already does the heavy lifting and baseline 3 applies. The description adds no parameter-level detail (url, lang, browser, timeout, auth_state, color_scheme are all handled in the schema), so it neither compensates nor degrades.

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?

States a specific verb and resource — a rendered WCAG audit executed via local Playwright/Chromium — and enumerates the concrete checks (contrast with alpha compositing, target size, focus indicator, rendered static checks). It is clearly distinguished from the sibling a11y_audit_url, which it explicitly positions against.

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?

Names the alternative and the condition that selects it: 'Use instead of a11y_audit_url on JS-heavy pages.' It also states the prerequisite ('Requires playwright: pip install playwright && playwright install chromium'), so the agent knows both when to pick this tool and what it needs to run.

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