Accessibility Audit
WCAG 2.2 Accessibility Audit and Remediation Skill
Description
The a11y-audit skill provides a complete accessibility audit pipeline for modern web applications. It implements a three-phase workflow -- Scan, Fix, Verify -- that identifies WCAG 2.2 Level A and AA violations, generates exact fix code per framework, and produces stakeholder-ready compliance reports.
For every violation it finds, it provides the precise before/after code fix tailored to your framework (React, Next.js, Vue, Angular, Svelte, or plain HTML).
What this skill does:
- Scans your codebase for every WCAG 2.2 Level A and AA violation, categorized by severity (Critical, Major, Minor)
- Fixes each violation with framework-specific before/after code patterns
- Verifies that fixes resolve the original violations and introduces no regressions
- Reports findings in a structured format suitable for developers, PMs, and compliance stakeholders
- Integrates into CI/CD pipelines to prevent accessibility regressions
Features
| Feature |
Description |
| Full WCAG 2.2 Scan |
Checks all Level A and AA success criteria across your codebase |
| Framework Detection |
Auto-detects React, Next.js, Vue, Angular, Svelte, or plain HTML |
| Severity Classification |
Categorizes each violation as Critical, Major, or Minor |
| Fix Code Generation |
Produces before/after code diffs for every issue |
| Color Contrast Checker |
Validates foreground/background pairs against AA and AAA ratios |
| Compliance Reporting |
Generates stakeholder reports with pass/fail summaries |
| CI/CD Integration |
GitHub Actions, GitLab CI, Azure DevOps pipeline configs |
| Keyboard Navigation Audit |
Detects missing focus management and tab order issues |
| ARIA Validation |
Checks for incorrect, redundant, or missing ARIA attributes |
Severity Definitions
| Severity |
Definition |
Example |
SLA |
| Critical |
Blocks access for entire user groups |
Missing alt text, no keyboard access to navigation |
Fix before release |
| Major |
Significant barrier that degrades experience |
Insufficient color contrast, missing form labels |
Fix within current sprint |
| Minor |
Usability issue that causes friction |
Redundant ARIA roles, suboptimal heading hierarchy |
Fix within next 2 sprints |
Usage
Quick Start
# Scan entire project
python scripts/a11y_scanner.py /path/to/project
# Scan with JSON output for tooling
python scripts/a11y_scanner.py /path/to/project --json
# Check color contrast for specific values
python scripts/contrast_checker.py --fg "#777777" --bg "#ffffff"
# Check contrast across a CSS/Tailwind file
python scripts/contrast_checker.py --file /path/to/styles.css
Slash Command
/a11y-audit # Audit current project
/a11y-audit --scope src/ # Audit specific directory
/a11y-audit --fix # Audit and auto-apply fixes
/a11y-audit --report # Generate stakeholder report
/a11y-audit --ci # Output CI-compatible results
Three-Phase Workflow
Phase 1: Scan -- Walk the source tree, detect framework, apply rule set.
python scripts/a11y_scanner.py /path/to/project --format table
Phase 2: Fix -- Apply framework-specific fixes for each violation.
See references/framework-a11y-patterns.md for the complete fix patterns catalog.
Phase 3: Verify -- Re-run the scanner to confirm fixes and check for regressions.
python scripts/a11y_scanner.py /path/to/project --baseline audit-baseline.json
Example: React Component Audit
// BEFORE: src/components/ProductCard.tsx
function ProductCard({ product }) {
return (
<div => navigate(`/product/${product.id}`)}>
<img src={product.image} />
<div style={{ color: '#aaa', fontSize: '12px' }}>{product.name}</div>
<span style={{ color: '#999' }}>${product.price}</span>
</div>
);
}
| # |
WCAG |
Severity |
Issue |
| 1 |
1.1.1 |
Critical |
<img> missing alt attribute |
| 2 |
2.1.1 |
Critical |
<div onClick> not keyboard accessible |
| 3 |
1.4.3 |
Major |
Color #aaa on white fails contrast (2.32:1, needs 4.5:1) |
| 4 |
1.4.3 |
Major |
Color #999 on white fails contrast (2.85:1, needs 4.5:1) |
| 5 |
4.1.2 |
Major |
Interactive element missing role and accessible name |
// AFTER: src/components/ProductCard.tsx
function ProductCard({ product }) {
return (
<a href={`/product/${product.id}`} className="product-card"
aria-label={`View ${product.name} - $${product.price}`}>
<img src={product.image} alt={product.imageAlt || product.name} />
<div style={{ color: '#595959', fontSize: '12px' }}>{product.name}</div>
<span style={{ color: '#767676' }}>${product.price}</span>
</a>
);
}
See references/examples-by-framework.md for Vue, Angular, Next.js, and Svelte examples.
Tools Reference
a11y_scanner.py
Usage: python scripts/a11y_scanner.py <path> [options]
Options:
--json Output results as JSON
--format {table,csv} Output format (default: table)
--severity {critical,major,minor} Filter by minimum severity
--framework {react,vue,angular,svelte,html,auto} Force framework (default: auto)
--baseline FILE Compare against previous scan results
--report Generate stakeholder report
--output FILE Write results to file
--quiet Suppress output, exit code only
--ci CI mode: non-zero exit on critical issues
contrast_checker.py
Usage: python scripts/contrast_checker.py [options]
Options:
--fg COLOR Foreground color (hex)
--bg COLOR Background color (hex)
--file FILE Scan CSS file for color pairs
--tailwind DIR Scan directory for Tailwind color classes
--json Output results as JSON
--suggest Suggest accessible alternatives for failures
--level {aa,aaa} Target conformance level (default: aa)
Common Pitfalls
| Pitfall |
Correct Approach |
role="button" on a <div> |
Use native <button> -- includes keyboard handling for free |
tabindex="0" on everything |
Only interactive elements need focus; use native elements |
aria-label on non-interactive elements |
Use aria-labelledby pointing to visible text |
display: none for screen reader hiding |
Use .sr-only class instead |
| Color alone to convey meaning |
Add icons, text labels, or patterns alongside color |
| Placeholder as only label |
Always provide a visible <label> |
outline: none without replacement |
Always provide a visible focus indicator via focus-visible |
Empty alt="" on informational images |
Informational images need descriptive alt text |
| Skipping heading levels (h1 -> h3) |
Heading levels must be sequential |
onClick without onKeyDown |
Add keyboard support or prefer native elements |
Ignoring prefers-reduced-motion |
Wrap animations in @media (prefers-reduced-motion: no-preference) |
Related Skills
| Skill |
Relationship |
| senior-frontend |
Frontend patterns used in a11y fixes |
| code-reviewer |
Include a11y checks in code review workflows |
| senior-qa |
Integration of a11y testing into QA processes |
| playwright-pro |
Automated browser testing with accessibility assertions |
| epic-design |
WCAG 2.1 AA compliant animations and scroll storytelling |
| tdd-guide |
Test-driven development patterns for a11y test cases |
Reference Documentation
| Reference |
Description |
| wcag-quick-ref.md |
WCAG 2.2 Level A & AA criteria quick reference |
| wcag-22-new-criteria.md |
New WCAG 2.2 success criteria (Focus Appearance, Target Size, etc.) |
| aria-patterns.md |
ARIA patterns, keyboard interaction, and live regions |
| framework-a11y-patterns.md |
Framework-specific fix patterns (React, Vue, Angular, Svelte, HTML) |
| color-contrast-guide.md |
Color contrast checker details, Tailwind palette mapping, sr-only class |
| ci-cd-integration.md |
GitHub Actions, GitLab CI, Azure DevOps, pre-commit hook configs |
| audit-report-template.md |
Stakeholder-ready audit report template |
| testing-checklist.md |
Manual testing checklist (keyboard, screen reader, visual, forms) |
| examples-by-framework.md |
Full audit examples for Vue, Angular, Next.js, and Svelte |
Resources
Source: alirezarezvani/claude-skills → engineering-team/a11y-audit/skills/a11y-audit/SKILL.md
1---
2name: a11y-audit
3description: "Accessibility audit skill for scanning, fixing, and verifying WCAG 2.2 Level A and AA compliance across React, Next.js, Vue, Angular, Svelte, and plain HTML codebases. Use when auditing accessibility, fixing a11y violations, checking color contrast, generating compliance reports, or integrating accessibility checks into CI/CD pipelines."
4category: frontend-and-design
5source_repo: alirezarezvani/claude-skills
6source_path: "engineering-team/a11y-audit/skills/a11y-audit/SKILL.md"
7source_url: https://github.com/alirezarezvani/claude-skills/blob/HEAD/engineering-team/a11y-audit/skills/a11y-audit/SKILL.md
8metadata:
9 source: https://skillmd.com/skills/thedixitjain/a11y-audit
10---
11
12
13# Accessibility Audit
14
15WCAG 2.2 Accessibility Audit and Remediation Skill
16
17## Description
18
19The a11y-audit skill provides a complete accessibility audit pipeline for modern web applications. It implements a three-phase workflow -- Scan, Fix, Verify -- that identifies WCAG 2.2 Level A and AA violations, generates exact fix code per framework, and produces stakeholder-ready compliance reports.
20
21For every violation it finds, it provides the precise before/after code fix tailored to your framework (React, Next.js, Vue, Angular, Svelte, or plain HTML).
22
23**What this skill does:**
24
251. **Scans** your codebase for every WCAG 2.2 Level A and AA violation, categorized by severity (Critical, Major, Minor)
262. **Fixes** each violation with framework-specific before/after code patterns
273. **Verifies** that fixes resolve the original violations and introduces no regressions
284. **Reports** findings in a structured format suitable for developers, PMs, and compliance stakeholders
295. **Integrates** into CI/CD pipelines to prevent accessibility regressions
30
31## Features
32
33| Feature | Description |
34|---------|-------------|
35| **Full WCAG 2.2 Scan** | Checks all Level A and AA success criteria across your codebase |
36| **Framework Detection** | Auto-detects React, Next.js, Vue, Angular, Svelte, or plain HTML |
37| **Severity Classification** | Categorizes each violation as Critical, Major, or Minor |
38| **Fix Code Generation** | Produces before/after code diffs for every issue |
39| **Color Contrast Checker** | Validates foreground/background pairs against AA and AAA ratios |
40| **Compliance Reporting** | Generates stakeholder reports with pass/fail summaries |
41| **CI/CD Integration** | GitHub Actions, GitLab CI, Azure DevOps pipeline configs |
42| **Keyboard Navigation Audit** | Detects missing focus management and tab order issues |
43| **ARIA Validation** | Checks for incorrect, redundant, or missing ARIA attributes |
44
45### Severity Definitions
46
47| Severity | Definition | Example | SLA |
48|----------|-----------|---------|-----|
49| **Critical** | Blocks access for entire user groups | Missing alt text, no keyboard access to navigation | Fix before release |
50| **Major** | Significant barrier that degrades experience | Insufficient color contrast, missing form labels | Fix within current sprint |
51| **Minor** | Usability issue that causes friction | Redundant ARIA roles, suboptimal heading hierarchy | Fix within next 2 sprints |
52
53## Usage
54
55### Quick Start
56
57```bash
58# Scan entire project
59python scripts/a11y_scanner.py /path/to/project
60
61# Scan with JSON output for tooling
62python scripts/a11y_scanner.py /path/to/project --json
63
64# Check color contrast for specific values
65python scripts/contrast_checker.py --fg "#777777" --bg "#ffffff"
66
67# Check contrast across a CSS/Tailwind file
68python scripts/contrast_checker.py --file /path/to/styles.css
69```
70
71### Slash Command
72
73```
74/a11y-audit # Audit current project
75/a11y-audit --scope src/ # Audit specific directory
76/a11y-audit --fix # Audit and auto-apply fixes
77/a11y-audit --report # Generate stakeholder report
78/a11y-audit --ci # Output CI-compatible results
79```
80
81### Three-Phase Workflow
82
83**Phase 1: Scan** -- Walk the source tree, detect framework, apply rule set.
84
85```bash
86python scripts/a11y_scanner.py /path/to/project --format table
87```
88
89**Phase 2: Fix** -- Apply framework-specific fixes for each violation.
90
91> See [references/framework-a11y-patterns.md](references/framework-a11y-patterns.md) for the complete fix patterns catalog.
92
93**Phase 3: Verify** -- Re-run the scanner to confirm fixes and check for regressions.
94
95```bash
96python scripts/a11y_scanner.py /path/to/project --baseline audit-baseline.json
97```
98
99## Example: React Component Audit
100
101```tsx
102// BEFORE: src/components/ProductCard.tsx
103function ProductCard({ product }) {
104 return (
105 <div onClick={() => navigate(`/product/${product.id}`)}>
106 <img src={product.image} />
107 <div style={{ color: '#aaa', fontSize: '12px' }}>{product.name}</div>
108 <span style={{ color: '#999' }}>${product.price}</span>
109 </div>
110 );
111}
112```
113
114| # | WCAG | Severity | Issue |
115|---|------|----------|-------|
116| 1 | 1.1.1 | Critical | `<img>` missing `alt` attribute |
117| 2 | 2.1.1 | Critical | `<div onClick>` not keyboard accessible |
118| 3 | 1.4.3 | Major | Color `#aaa` on white fails contrast (2.32:1, needs 4.5:1) |
119| 4 | 1.4.3 | Major | Color `#999` on white fails contrast (2.85:1, needs 4.5:1) |
120| 5 | 4.1.2 | Major | Interactive element missing role and accessible name |
121
122```tsx
123// AFTER: src/components/ProductCard.tsx
124function ProductCard({ product }) {
125 return (
126 <a href={`/product/${product.id}`} className="product-card"
127 aria-label={`View ${product.name} - $${product.price}`}>
128 <img src={product.image} alt={product.imageAlt || product.name} />
129 <div style={{ color: '#595959', fontSize: '12px' }}>{product.name}</div>
130 <span style={{ color: '#767676' }}>${product.price}</span>
131 </a>
132 );
133}
134```
135
136> See [references/examples-by-framework.md](references/examples-by-framework.md) for Vue, Angular, Next.js, and Svelte examples.
137
138## Tools Reference
139
140### a11y_scanner.py
141
142```
143Usage: python scripts/a11y_scanner.py <path> [options]
144
145Options:
146 --json Output results as JSON
147 --format {table,csv} Output format (default: table)
148 --severity {critical,major,minor} Filter by minimum severity
149 --framework {react,vue,angular,svelte,html,auto} Force framework (default: auto)
150 --baseline FILE Compare against previous scan results
151 --report Generate stakeholder report
152 --output FILE Write results to file
153 --quiet Suppress output, exit code only
154 --ci CI mode: non-zero exit on critical issues
155```
156
157### contrast_checker.py
158
159```
160Usage: python scripts/contrast_checker.py [options]
161
162Options:
163 --fg COLOR Foreground color (hex)
164 --bg COLOR Background color (hex)
165 --file FILE Scan CSS file for color pairs
166 --tailwind DIR Scan directory for Tailwind color classes
167 --json Output results as JSON
168 --suggest Suggest accessible alternatives for failures
169 --level {aa,aaa} Target conformance level (default: aa)
170```
171
172## Common Pitfalls
173
174| Pitfall | Correct Approach |
175|---------|------------------|
176| `role="button"` on a `<div>` | Use native `<button>` -- includes keyboard handling for free |
177| `tabindex="0"` on everything | Only interactive elements need focus; use native elements |
178| `aria-label` on non-interactive elements | Use `aria-labelledby` pointing to visible text |
179| `display: none` for screen reader hiding | Use `.sr-only` class instead |
180| Color alone to convey meaning | Add icons, text labels, or patterns alongside color |
181| Placeholder as only label | Always provide a visible `<label>` |
182| `outline: none` without replacement | Always provide a visible focus indicator via `focus-visible` |
183| Empty `alt=""` on informational images | Informational images need descriptive alt text |
184| Skipping heading levels (h1 -> h3) | Heading levels must be sequential |
185| `onClick` without `onKeyDown` | Add keyboard support or prefer native elements |
186| Ignoring `prefers-reduced-motion` | Wrap animations in `@media (prefers-reduced-motion: no-preference)` |
187
188## Related Skills
189
190| Skill | Relationship |
191|-------|-------------|
192| **senior-frontend** | Frontend patterns used in a11y fixes |
193| **code-reviewer** | Include a11y checks in code review workflows |
194| **senior-qa** | Integration of a11y testing into QA processes |
195| **playwright-pro** | Automated browser testing with accessibility assertions |
196| **epic-design** | WCAG 2.1 AA compliant animations and scroll storytelling |
197| **tdd-guide** | Test-driven development patterns for a11y test cases |
198
199## Reference Documentation
200
201| Reference | Description |
202|-----------|-------------|
203| [wcag-quick-ref.md](references/wcag-quick-ref.md) | WCAG 2.2 Level A & AA criteria quick reference |
204| [wcag-22-new-criteria.md](references/wcag-22-new-criteria.md) | New WCAG 2.2 success criteria (Focus Appearance, Target Size, etc.) |
205| [aria-patterns.md](references/aria-patterns.md) | ARIA patterns, keyboard interaction, and live regions |
206| [framework-a11y-patterns.md](references/framework-a11y-patterns.md) | Framework-specific fix patterns (React, Vue, Angular, Svelte, HTML) |
207| [color-contrast-guide.md](references/color-contrast-guide.md) | Color contrast checker details, Tailwind palette mapping, sr-only class |
208| [ci-cd-integration.md](references/ci-cd-integration.md) | GitHub Actions, GitLab CI, Azure DevOps, pre-commit hook configs |
209| [audit-report-template.md](references/audit-report-template.md) | Stakeholder-ready audit report template |
210| [testing-checklist.md](references/testing-checklist.md) | Manual testing checklist (keyboard, screen reader, visual, forms) |
211| [examples-by-framework.md](references/examples-by-framework.md) | Full audit examples for Vue, Angular, Next.js, and Svelte |
212
213## Resources
214
215- [WCAG 2.2 Specification](https://www.w3.org/TR/WCAG22/)
216- [WAI-ARIA Authoring Practices 1.2](https://www.w3.org/WAI/ARIA/apg/)
217- [Deque axe-core Rules](https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md)
218- [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
219
220---
221
222**Source:** [`alirezarezvani/claude-skills`](https://github.com/alirezarezvani/claude-skills) → `engineering-team/a11y-audit/skills/a11y-audit/SKILL.md`