From devflow-enforcer
Perform comprehensive WCAG 2.1 AA accessibility audit. Tests for screen reader compatibility, keyboard navigation, color contrast, and ARIA correctness.
How this skill is triggered — by the user, by Claude, or both
Slash command
/devflow-enforcer:accessibility-auditThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill performs a comprehensive WCAG 2.1 AA accessibility audit, testing:
This skill performs a comprehensive WCAG 2.1 AA accessibility audit, testing:
Ensure WCAG 2.1 AA compliance before release. This skill should be used:
1. RUN automated tests (axe-core)
2. MANUAL keyboard navigation test
3. SCREEN reader testing (NVDA/VoiceOver)
4. CHECK color contrast ratios
5. VALIDATE ARIA attributes
6. TEST form accessibility
7. VERIFY focus management
8. GENERATE compliance report
9. PROVIDE remediation guidance
| Parameter | Type | Description | Required |
|---|---|---|---|
| url | string | URL to audit | Yes |
| wcagLevel | string | Target WCAG level (AA default) | No |
| includeScreenReader | boolean | Include screen reader tests | No |
| pages | string[] | Specific pages to audit | No |
# Accessibility Audit Report
**Date:** [timestamp]
**URL:** [audited URL]
**WCAG Level:** AA
**Auditor:** Accessibility Expert Agent
## Compliance Summary
| Category | Tests | Passed | Failed | Compliance |
|----------|-------|--------|--------|------------|
| Perceivable | 15 | 14 | 1 | 93% |
| Operable | 12 | 12 | 0 | 100% |
| Understandable | 8 | 7 | 1 | 88% |
| Robust | 5 | 5 | 0 | 100% |
| **Total** | **40** | **38** | **2** | **95%** |
## Critical Violations (Block Release)
### 1. Color Contrast Insufficient
- **WCAG:** 1.4.3 Contrast (Minimum)
- **Impact:** Critical
- **Location:** .btn-primary
- **Current:** #888888 on #FFFFFF (3.5:1)
- **Required:** 4.5:1 minimum
- **Fix:** Change text to #616161 or darker
- **Code:**
```css
.btn-primary {
color: #616161; /* 5.1:1 contrast */
}
[Same format]
[Same format]
| Test | Result | Notes |
|---|---|---|
| Tab order logical | Pass | Sequential through form |
| Focus visible | Pass | Blue outline present |
| Skip link works | Pass | Jumps to main content |
| Modal focus trap | Pass | Focus stays in modal |
| Escape closes modal | Pass | Works correctly |
| Element | Result | Announced As |
|---|---|---|
| Main navigation | Pass | "Navigation landmark" |
| Search input | Pass | "Search, edit, blank" |
| Submit button | Pass | "Submit, button" |
| Error message | Fail | Not announced |
| Success toast | Pass | "Success, alert" |
| File | Changes Needed |
|---|---|
| styles/buttons.css | Update color values |
| components/Form.tsx | Add aria-describedby |
| components/Error.tsx | Add aria-live |
# Run axe-core
npx axe-cli [url] --tags wcag2aa
# Validate HTML
npx html-validate [url]
# Check contrast
npx color-contrast-checker --ratio 4.5
## Example Usage
### Example 1: Audit Login Page
USER: /accessibility-audit https://example.com/login
SKILL OUTPUT:
Date: 2026-02-17T12:00:00Z URL: https://example.com/login WCAG Level: AA Auditor: Accessibility Expert Agent
| Category | Tests | Passed | Failed | Compliance |
|---|---|---|---|---|
| Perceivable | 12 | 10 | 2 | 83% |
| Operable | 10 | 9 | 1 | 90% |
| Understandable | 6 | 5 | 1 | 83% |
| Robust | 4 | 4 | 0 | 100% |
| Total | 32 | 28 | 4 | 88% |
<label for="email">Email Address</label>
<input type="email" id="email" name="email" />
### Example 2: Quick Contrast Check
USER: Check color contrast for primary button
SKILL INPUT: { "foreground": "#3b82f6", "background": "#ffffff" }
SKILL OUTPUT:
| Combination | Ratio | AA Text | AA Large | AAA Text |
|---|---|---|---|---|
| #3b82f6 on #ffffff | 3.9:1 | ❌ Fail | ✅ Pass | ❌ Fail |
Recommendation: For normal text, use #2563eb (4.5:1) or darker.
/* Current */
.btn-primary {
background: #3b82f6;
}
/* Recommended */
.btn-primary {
background: #2563eb; /* WCAG AA compliant for text */
}
## WCAG 2.1 AA Quick Reference
| Criterion | Requirement | Test |
|-----------|-------------|------|
| 1.1.1 | Alt text for images | Check img tags |
| 1.3.1 | Semantic structure | Check headings, lists |
| 1.4.3 | 4.5:1 contrast (text) | Contrast checker |
| 1.4.11 | 3:1 contrast (UI) | Contrast checker |
| 2.1.1 | Keyboard accessible | Tab through page |
| 2.4.1 | Skip navigation | Test skip link |
| 2.4.7 | Visible focus | Tab and observe |
| 4.1.2 | ARIA correct | axe-core scan |
## Tools Used
| Tool | Purpose |
|------|---------|
| axe-core | Automated testing |
| WAVE | Visual feedback |
| NVDA | Screen reader testing |
| Keyboard | Manual navigation |
| Contrast Checker | Color validation |
## Integration
This skill integrates with:
- **ui-review**: Combined with visual review
- **accessibility-expert-agent**: For remediation guidance
- **frontend-developer**: For implementation fixes
npx claudepluginhub xarlord/devflow-enforcer --plugin devflow-enforcerAudits products for WCAG 2.1 AA compliance using automated scanning, color contrast analysis, keyboard navigation tests, and screen reader testing.
Audits Figma designs or web pages for WCAG 2.1 AA compliance, checking color contrast, keyboard navigation, touch targets, labels, and screen reader support.