/wcag-compliance-reviewer:wcag-compliance-reviewerfrom wcag-compliance-reviewer
Reviews HTML/CSS and React code for WCAG 2.2 Level AA violations. Provides targeted fixes for each accessibility issue found. Use when the user asks to check WCAG compliance or audit accessibility.
Ships in wcag-compliance-reviewer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Review code changes for WCAG 2.2 Level AA accessibility compliance in HTML/CSS and React/TypeScript components. This skill identifies violations, provides specific fixes, and recommends automated testing approaches. Also covers all WCAG 2.1 and 2.0 criteria.
Follow these steps exactly when reviewing code for accessibility.
Default: Use WCAG 2.2 AA from static reference (references/wcag-aa-guidelines.md)
Fetch from W3C website if:
Use WCAG 2.1 instead if:
Example user phrases that trigger web fetch:
Read the code and identify:
Based on the code type and complexity, load the appropriate reference files:
WCAG Guidelines Source:
Choose one of these approaches based on user request:
Option A: Use static reference (default, faster)
references/wcag-aa-guidelines.md - Complete WCAG 2.2 AA success criteria (includes all 2.1 criteria)Option B: Fetch from official W3C website
Use when user:
Fetch using web_fetch:
WCAG 2.2 AA Quick Reference:
https://www.w3.org/WAI/WCAG22/quickref/?versions=2.2&levels=a,aa
Understanding WCAG 2.2:
https://www.w3.org/WAI/WCAG22/Understanding/
WCAG 2.1 AA Quick Reference (older version):
https://www.w3.org/WAI/WCAG21/quickref/?versions=2.1&levels=a,aa
Understanding WCAG 2.1:
https://www.w3.org/WAI/WCAG21/Understanding/
After fetching, combine official guidelines with code examples from references/common-violations.md
Always load when reviewing code:
references/common-violations.md - Code examples and fixes for HTML/CSS/React/TypeScriptreferences/testing-guide.md - When user asks about testing or wants to set up automated checksContrast ratios, computed sizes, and touch-target dimensions are measurements, not readings. Never state one that you did not obtain from a tool run.
Reading a hex pair out of a stylesheet and reporting "3.8:1" is the single
failure mode this skill is most prone to, because the number looks like analysis
and reads as authoritative. Source CSS is not the rendered result: a color
declaration can be overridden by specificity, recomputed by color-mix() or
light-dark(), altered by opacity or a blend mode, or inherited from a variable
whose value is only resolved at runtime. Two ratios shipped by this skill were
wrong for exactly that reason and were caught downstream.
For anything with a number attached:
Measure it. Against a running page, read computed styles with the browser MCP or Playwright:
const s = getComputedStyle(el);
({ color: s.color, bg: s.backgroundColor, outline: s.outlineColor,
box: el.getBoundingClientRect() }); // box → touch targets, 2.5.8
For a static file with no server, compute from the resolved values: read
both colors, flatten any alpha against the actual backdrop, and run the WCAG
relative-luminance formula with Bash(python3 *), showing the arithmetic.
def lum(c): # c = (r, g, b), each 0-255
def ch(v):
v /= 255
return v / 12.92 if v <= 0.03928 else ((v + 0.055) / 1.055) ** 2.4
r, g, b = (ch(x) for x in c)
return 0.2126 * r + 0.7152 * g + 0.0722 * b
ratio = (max(lum(fg), lum(bg)) + 0.05) / (min(lum(fg), lum(bg)) + 0.05)
check_wcag.py does not compute this. Its _similar_lightness averages
RGB and returns a boolean for "both light or both dark", then emits
"Potential color contrast issue — verify 4.5:1". That is a prompt to go
measure, not a measurement, and its output must never be pasted as one. Use
it to surface candidate pairs worth checking; get the number from the
formula above or from the browser.
Paste the raw tool output into the finding, before the conclusion. A ratio with no visible measurement behind it is an estimate wearing a measurement's clothes.
Only when you can neither reach a browser nor resolve the values
statically, write UNVERIFIED — <reason> (no browser, values unresolved)
and describe what to check by hand. A ratio you computed from resolved
values with the arithmetic shown is verified — the absence of a browser
does not downgrade it, or step 1's static path would never produce a usable
number. Never substitute a grep of the source and report it as
verification.
An honest UNVERIFIED costs the reader one manual check. A confident wrong
ratio costs them the entire audit's credibility.
Everything without a number — a missing alt, an unlabeled input, a heading
skip, an onClick with no key handler — is a genuine source reading. Report
those from the code directly.
Review code against the four WCAG principles in this order:
A. Perceivable (Priority: High)
B. Operable (Priority: High)
C. Understandable (Priority: Medium)
D. Robust (Priority: Medium)
Errors (Must Fix):
Warnings (Should Fix):
Recommendations (Best Practices):
For each issue identified:
common-violations.mdExample format:
❌ Issue: Missing alt text (WCAG 1.1.1 - Level A)
Line 23:
<img src="logo.png">
✅ Fix:
<img src="logo.png" alt="Company Name Logo">
Why: Screen readers announce "logo.png" without alt text, which is not meaningful. The alt text provides the image's purpose.
Based on the code complexity, recommend appropriate testing tools from references/testing-guide.md:
For all reviews, recommend:
For component libraries or complex UIs, additionally recommend:
For full applications, additionally recommend:
Structure the review output as follows:
# Accessibility Review Summary
## Issues Found: X errors, Y warnings
### Critical Issues (Errors)
[List each error with line number, rule, and fix]
### Warnings
[List each warning with line number, rule, and fix]
### Recommendations
[List best practice improvements]
## Testing Recommendations
[Specific tools and approaches for this codebase]
## Quick Wins
[Easy fixes that provide significant accessibility improvements]
Use this for rapid reviews:
Images & Media:
Forms:
Keyboard & Focus:
Color & Contrast:
Structure & Semantics:
ARIA:
Dynamic Content:
WCAG 2.2 New Criteria:
// ✅ Good - TypeScript
<button onClick={handleDelete} aria-label="Delete item">
<TrashIcon aria-hidden="true" />
</button>
// ✅ Good - Focus trap and restoration
<div
role="dialog"
aria-modal="true"
aria-labelledby="modal-title"
>
<h2 id="modal-title">Modal Title</h2>
<button onClick={onClose}>Close</button>
{children}
</div>
// ✅ Good - Associated error, proper ARIA
<label htmlFor="email">Email:</label>
<input
type="email"
id="email"
aria-invalid={!!error}
aria-describedby={error ? "email-error" : undefined}
/>
{error && (
<div id="email-error" role="alert">
{error}
</div>
)}
For initial scanning of files, use the provided Python script:
python3 "${CLAUDE_SKILL_DIR}/scripts/check_wcag.py" path/to/component.tsx
${CLAUDE_SKILL_DIR} is replaced with this skill's absolute folder when the
skill loads, so the command works from any directory. In a claude.ai sandbox
the skill folder is copied in, so scripts/check_wcag.py relative to this
file resolves there too.
This performs static analysis to catch common issues like:
Note: The script catches ~30% of issues. Always perform comprehensive manual review using the full checklist above.
check_wcag.py - Automated accessibility checker for HTML/CSS/React/TypeScript fileswcag-aa-guidelines.md - Complete WCAG 2.2 Level AA success criteria organized by principlecommon-violations.md - Common accessibility violations with before/after code examples for HTML/CSS and React/TypeScripttesting-guide.md - Automated testing tools, setup instructions, and manual testing checklistsWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub shawn-sandy/agentics --plugin wcag-compliance-reviewer2 plugins ship this exact skill · first indexed Oct 30, 2026