A11y audit
Run a WCAG 2.2 AA accessibility audit on a URL or local HTML file using axe-core + Playwright, then propose diff-based fixes. Use when the user asks to audit accessibility, check WCAG compliance, fix a11y issues, or mentions contrast/screen-reader/keyboard problems.From its SKILL.md
npx -y skills add Alepha188838884/accessmend --skill a11y-auditAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
9.9 KB, as published. Nobody here has run it
a11y-audit
Audit a web app against WCAG 2.2 AA using axe-core + Playwright, then fix what you find — mechanically where confidence is high, with a proposed diff and rationale where it isn't, and with a TODO where it's a design decision, not a bug.
Compliance disclaimer (say this, don't paraphrase it away): automated tools catch at most ~57% of real accessibility issues by volume. This skill assists a manual/automated audit; it does not certify or guarantee WCAG compliance. Never claim otherwise, no matter how clean a re-run looks.
Workflow
0. Setup (one-time)
A SessionStart hook installs ${CLAUDE_PLUGIN_ROOT}/node_modules
automatically the first time a session opens with this plugin installed. If
the MCP server isn't ready yet in that first session, restart the session or
run /mcp to reconnect. As a fallback, run
npm install --prefix "${CLAUDE_PLUGIN_ROOT}" manually, then
npx playwright install chromium if Chromium isn't installed yet.
1. Run the audit
npx tsx ${CLAUDE_PLUGIN_ROOT}/scripts/run-axe.ts <target> --json /tmp/accessmend-report.json
<target>is a URL (http://localhost:3000) or a local.htmlfile path.- Optional
--tags wcag2a,wcag2aa,wcag22aato override the default tag set (default already covers WCAG 2.0/2.1/2.2 A+AA). - If the first run fails because Playwright has no browser installed, run
npx playwright install chromiumonce, then re-run the audit command. - Read the JSON report. It's grouped into work items with
ruleId,wcag(SC numbers),impact,tier(T1–T4/other), andnodes(selector + html snippet + failureSummary per offending element).
2. Locate in source
axe only gives you a DOM selector and an HTML snippet — not a file:line. You have to find it yourself:
- Grep the project source for the class names, id, text content, or
distinctive attributes in the node's
htmlsnippet. - For SPAs, search component source (
.jsx/.tsx/.vue/etc.), notdist/orbuild/— the built output won't map back to anything editable. - If a selector matches multiple source locations (e.g. a shared component rendered many times), report all of them.
- Every work item must resolve to a
file:linebefore it moves to step 4. If you can't locate it, say so explicitly in the report instead of guessing.
3. Reason beyond axe
axe-core is deliberately conservative (near-zero false positives), so it misses a large class of real issues that need judgment. For every page, do a manual pass — this is what the LLM layer is for, and it's where most of the value beyond a plain axe run comes from:
langconsistency: axe only checks thatlangexists and is a valid code, not that it matches the actual content language. Read the page's actual text and compare.- Placeholder-as-label: a text input whose only "label" is its
placeholderpasses axe'slabelrule (accname falls back to placeholder), but the placeholder disappears on input and isn't a stable name (SC 1.3.1/3.3.2). This is the single most frequent pattern in our six-project audit (5/6) — check every input for a real associated<label>, not just the presence of placeholder text. - Fake buttons: a
div/spanwithonclick/cursor:pointerbut norole,tabindex, or key handler is invisible to axe — it reports 0 violations for these by design, since nothing marks the element as interactive. Check whether these sit on the core task path (3/6 projects, always on core interactions) and weight severity up accordingly (SC 2.1.1/4.1.2). - Scaffold-default titles: axe's
document-titlerule only fires when the title is missing or empty. Also read the actual title text and flag scaffold leftovers like "Vite + React", "-", or "React App" (SC 2.4.2; 3/6 projects). - Missing
aria-liveregions: places that update dynamically but have no live region — "AI is generating...", async results appearing, filter/result counts changing, recording/upload status. axe can't detect an absence like this; you have to look for dynamic content and ask "would a screen reader user know this changed?" role="dialog"without focus management: check that focus moves into the dialog on open, returns to the trigger on close, is trapped inside while open, and Escape closes it. A dialog can pass every axe rule and still be unusable.- Long-running animations: any animation running >5s in a loop needs an
in-page pause/stop control, and the page should respect
prefers-reduced-motionas a fallback. axe doesn't check either. - Severity weighting: bump severity for anything blocking a core task
path (e.g. keyboard-inaccessible primary actions) over cosmetic issues in
peripheral UI, even if axe reports them at the same
impactlevel. - Do not invent violations for subjective UI complexity/consistency issues (e.g. "this flow feels inconsistent with that flow"). There's no reliable pass/fail criterion for these — flag them as an observation/note if genuinely useful, never as a violation. False "violations" here destroy trust in the whole report.
4. Fix by confidence tier
Three confidence tiers (per ARCHITECTURE.md §3.3), each handled differently:
- Mechanical fixes (axe-reported T1: missing
label/lang/title/alt, wrong attribute names, etc.) → generate a unified diff directly. Every hunk must cite its WCAG SC number(s) from the work item. - Context fixes (medium confidence:
alttext content,aria-liveplacement, contrast/color changes) → propose a diff and a one-line rationale, then wait for confirmation before applying.- Before changing any color, you must call the
check_contrasttool on theaccessmend-colorMCP server withsuggest_fix: trueto verify the new value. Never eyeball or mentally compute a contrast ratio. - Prefer fixing at the CSS-variable/token level over patching each occurrence individually — one token fix can resolve every instance site-wide instead of a dozen scattered edits.
- Before changing any color, you must call the
- Design decisions (low confidence: full palette redesign, information
architecture changes) → leave a
TODOcomment plus a written suggestion. Do not touch the code.
5. Verify
Re-run step 1's audit command and diff the violation counts before vs. after. Keep iterating until violations hit 0 or only explicitly-skipped items (T3/T4 design-decision TODOs) remain.
Report format:
Before: N violations (by tier: T1=x, T2=y, T3=z, T4=w)
After: M violations
Fixes applied:
- <file:line> — <ruleId> — WCAG <SC#> — <one-line description>
...
Remaining (not auto-fixed, see TODO): <file:line> — <reason>
Hard rules
- Never claim the tool "guarantees compliance." Standard wording: "Automated tools catch at most ~57% of real issues by volume; this assists, it does not certify." (This is the FTC v. AccessiBe lesson — AccessiBe was fined for overstating what automated AI accessibility tooling delivers.)
- Never eyeball contrast ratios. Always call the
check_contrastMCP tool. In our own audit, 5 of 18 colors that looked "suspicious" by eye actually passed once computed — visual judgment on contrast is not reliable enough to act on. - Alpha/gradient backgrounds: pass the composited (worst-case-stop) color
into
check_contrast— it acceptsrgbaand composites automatically. Do not manually pre-blend or approximate. - Do not modify files outside the audited project.
- Do not auto-fix T4 content-pipeline issues (e.g. CMS
alttext fields with no content). Leave aTODO+ suggestion only — these need a human who knows what the image actually depicts.
Rule tiers
Priority order = fix order. Reference: ARCHITECTURE.md §3.4. Frequencies come from a deep source audit of six real deployed apps (n=6), cross-calibrated against WebAIM Million 2026 (shallow, n=1M): contrast and form labels rank top-3 in both samples; empty links/buttons were rare in the n=6 deep audit (1/6) but hit 46.3% / 30.6% of pages globally — treat them as high-frequency.
| Tier | Criteria | One-liner | Frequency evidence |
|---|---|---|---|
| T1 — high-frequency, mechanically fixable | 1.4.3 / 1.4.11, 1.3.1 / 3.3.2, 3.1.1, scaffold hygiene | Contrast, unbound form labels, lang mismatch, default/placeholder titles — fix directly, generate diff | contrast: 6/6 (n=6 deep audit) + 83.9% global (#1 both); labels: 5/6 + 51.0%; lang: 4/6 (mismatch — invisible to all automated tools); scaffold: 3/6 |
| T2 — blocking, needs context | 2.1.1, 4.1.2, 4.1.3, 2.4.4 | Keyboard traps on core paths, dialogs without focus management, missing aria-live, empty links/buttons (link-name/button-name) — propose diff + rationale | keyboard: 3/6 (core path); dialog: 3/6; aria-live: 4/6; empty links/buttons: 46.3% / 30.6% global |
| T3 — regulatory completeness, low frequency | 2.4.11, 2.5.7, 2.5.8, 3.3.8 (new AA); 3.2.6, 3.3.7 (new A) | New WCAG 2.2 criteria — cover them, but not a marketing focus | 0/6 in the n=6 deep audit (report as passing, not a gap) |
| T4 — cognitive/sensory, differentiator | 2.2.2, prefers-reduced-motion, content-pipeline alt quality, UI consistency | Unpausable long animations, no reduced-motion fallback, CMS alt gaps — flag + TODO, don't auto-fix; UI consistency is observation-only, never a reported violation | animation pause: 6/6 in one project; reduced-motion: 3/6 |
Fix T1 first (safe, high-confidence, unblocks the bulk of the violation count), then T2 (needs your judgment but is usually still blocking), then T3 (complete the mapping), then T4 (flag/TODO — don't auto-fix content or design issues).