A11Y-002 recommended wcag-compliance

Automated accessibility testing in CI

Automated testing catches ~30-40% of accessibility issues before they ship. Tools like axe-core, pa11y, or Lighthouse CI integrated into the build pipeline.

Question to ask

"Would a missing label on a form input ship undetected?"

Verification guide

Severity: Recommended

Automated testing catches ~30-40% of accessibility issues before they ship. It's the minimum viable accessibility practice.

Check automatically:

# Check for a11y testing libraries in dependencies
grep -E "axe-core|@axe-core|jest-axe|cypress-axe|pa11y|lighthouse" package.json pnpm-lock.yaml 2>/dev/null

# Check for Lighthouse CI config
find . -maxdepth 3 -type f \( -name "lighthouserc*" -o -name ".lighthouserc*" \) 2>/dev/null

# Check CI for accessibility jobs
grep -riE "axe|lighthouse|a11y|accessibility" .github/workflows/ .circleci/ .gitlab-ci.yml 2>/dev/null

# Look for a11y test files
find . -maxdepth 5 -type f \( -name "*a11y*" -o -name "*accessibility*" \) \( -name "*.test.*" -o -name "*.spec.*" \) 2>/dev/null | grep -v node_modules

If config exists: Use subagent to run the tests and verify they execute.

Pass criteria:

  • Accessibility testing tool installed (axe-core, pa11y, Lighthouse CI)
  • Tests actually exist and run
  • Integrated into CI (not just local)

Fail criteria:

  • No a11y testing tools
  • Tools installed but no tests written
  • Tests exist but not in CI (manual only)

Cross-reference with:

  • A11Y-001 (tests should verify against stated target)
  • Section 8 (Testing & Code Metrics) — testing infrastructure

Evidence to capture:

  • Testing tool(s) in use
  • Number of a11y tests
  • CI integration status
  • Sample test output

Section

41. Accessibility

Team & Development