accessibility-audit
WCAG 2.2 compliance auditing: automated scanning with axe-core, keyboard navigation testing, screen reader checks, and color contrast validation.
What this skill does
# Accessibility Audit
Test web applications for WCAG 2.2 compliance and inclusive design.
## Automated Scanning
### axe-core CLI
```bash
# Scan a URL
npx @axe-core/cli https://example.com
# Scan with specific rules
npx @axe-core/cli https://example.com --rules color-contrast,label
# JSON output
npx @axe-core/cli https://example.com --format json > a11y-report.json
# Disable specific rules
npx @axe-core/cli https://example.com --disable scrollable-region-focusable
```
### Lighthouse accessibility audit
```bash
# Accessibility category only
lighthouse https://example.com --only-categories=accessibility --output json | jq '{score: .categories.accessibility.score, issues: [.audits | to_entries[] | select(.value.score == 0) | {id: .key, title: .value.title, description: .value.description}]}'
# Desktop
lighthouse https://example.com --only-categories=accessibility --preset=desktop --output json | jq '.categories.accessibility.score'
```
### Playwright with axe-core
```bash
# Install
npm install --save-dev @axe-core/playwright
# Test file
cat > a11y.spec.ts << 'EOF'
import { test, expect } from '@playwright/test';
import AxeBuilder from '@axe-core/playwright';
test('homepage has no a11y violations', async ({ page }) => {
await page.goto('http://localhost:3000');
const results = await new AxeBuilder({ page }).analyze();
expect(results.violations).toEqual([]);
});
test('form page has no a11y violations', async ({ page }) => {
await page.goto('http://localhost:3000/form');
const results = await new AxeBuilder({ page })
.withTags(['wcag2a', 'wcag2aa'])
.analyze();
expect(results.violations).toEqual([]);
});
EOF
npx playwright test a11y.spec.ts
```
## Color Contrast
```bash
# Check contrast ratio (needs two hex colors)
# WCAG AA: 4.5:1 for normal text, 3:1 for large text
# WCAG AAA: 7:1 for normal text, 4.5:1 for large text
python3 -c "
def luminance(hex_color):
r, g, b = [int(hex_color[i:i+2], 16)/255 for i in (1, 3, 5)]
def adjust(c): return c/12.92 if c <= 0.03928 else ((c+0.055)/1.055)**2.4
return 0.2126*adjust(r) + 0.7152*adjust(g) + 0.0722*adjust(b)
def contrast(c1, c2):
l1, l2 = luminance(c1), luminance(c2)
lighter, darker = max(l1,l2), min(l1,l2)
return (lighter + 0.05) / (darker + 0.05)
fg, bg = '#333333', '#FFFFFF'
ratio = contrast(fg, bg)
print(f'Contrast ratio: {ratio:.2f}:1')
print(f'AA normal text (4.5:1): {\"PASS\" if ratio >= 4.5 else \"FAIL\"}')
print(f'AA large text (3:1): {\"PASS\" if ratio >= 3 else \"FAIL\"}')
print(f'AAA normal text (7:1): {\"PASS\" if ratio >= 7 else \"FAIL\"}')
"
```
## Keyboard Navigation Check
### Manual testing checklist
```
[ ] All interactive elements reachable via Tab
[ ] Tab order follows visual/logical order
[ ] Focus indicator visible on all focused elements
[ ] Escape closes modals/dropdowns
[ ] Enter/Space activates buttons and links
[ ] Arrow keys navigate within menus, tabs, radio groups
[ ] No keyboard traps (can Tab out of every component)
[ ] Skip-to-content link present
```
### Automated focus order check
```bash
# Playwright: verify tab order
cat > focus-order.spec.ts << 'EOF'
import { test, expect } from '@playwright/test';
test('tab order is correct', async ({ page }) => {
await page.goto('http://localhost:3000');
await page.keyboard.press('Tab');
const first = await page.evaluate(() => document.activeElement?.tagName);
expect(first).toBe('A'); // Skip link or first nav item
});
EOF
```
## Common Issues
| Issue | Fix |
|-------|-----|
| Missing alt text on images | Add descriptive `alt=""` (decorative) or `alt="description"` |
| Missing form labels | Add `<label for="id">` or `aria-label` |
| Low color contrast | Increase contrast to 4.5:1 minimum |
| Missing heading hierarchy | Use h1 → h2 → h3 in order, don't skip levels |
| Non-descriptive link text | "Read more about pricing" not "Click here" |
| Missing ARIA landmarks | Use semantic HTML: `<nav>`, `<main>`, `<aside>`, `<footer>` |
| Auto-playing media | Add pause/stop controls |
## Notes
- Automated tools catch ~30% of accessibility issues. Manual testing is required.
- Test with actual screen readers: VoiceOver (macOS), NVDA (Windows), TalkBack (Android).
- Semantic HTML (`<button>`, `<nav>`, `<main>`) is more accessible than `<div>` with ARIA roles.
- ARIA is a last resort — use native HTML elements first.
- Test at 200% zoom — content should reflow without horizontal scrolling.
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.