A11Y-004 recommended wcag-compliance

Keyboard navigation works

Core flows work with keyboard only. Focus is visible, focus order is logical, skip links exist, and modals trap focus correctly.

Question to ask

"Tab through your app — where does focus go invisible?"

Verification guide

Severity: Recommended

Many users rely on keyboard-only navigation — not just screen reader users. Motor impairments, power users, and broken trackpads all depend on this.

Check automatically:

# Look for focus management patterns in code
grep -riE "tabindex|focus\(\)|onKeyDown|onKeyUp|keyboardEvent|aria-activedescendant" src/ --include="*.tsx" --include="*.jsx" --include="*.ts" --include="*.js" 2>/dev/null | head -20

# Check for focus-visible CSS (good sign)
grep -riE ":focus-visible|:focus" src/ --include="*.css" --include="*.scss" --include="*.tsx" 2>/dev/null | head -10

# Check for skip links (navigation accessibility)
grep -riE "skip.*main|skip.*nav|skip.*content" src/ --include="*.tsx" --include="*.jsx" --include="*.html" 2>/dev/null

# Look for keyboard testing in test files
grep -riE "keyboard|tab|focus|userEvent\.tab|fireEvent\.keyDown" --include="*.test.*" --include="*.spec.*" . 2>/dev/null | grep -v node_modules | head -10

# RED FLAG: outline:none without replacement (hides focus)
grep -riE "outline:\s*none|outline:\s*0" src/ --include="*.css" --include="*.scss" 2>/dev/null

Ask user:

  • "Can you complete core flows using only keyboard?" (Tab, Enter, Escape, Arrow keys)
  • "Is there a skip-to-content link?"
  • "Do modals trap focus correctly?"

Pass criteria:

  • Core flows work with keyboard only
  • Focus is visible (not hidden with outline: none)
  • Focus order is logical
  • Skip link exists for content-heavy pages

Fail criteria:

  • Can't complete critical flows without mouse
  • Focus indicators removed globally
  • Focus traps in modals don't work (or don't exist)
  • Custom components ignore keyboard entirely

Cross-reference with: A11Y-008 (ARIA attributes help keyboard users)

Evidence to capture:

  • Focus management patterns found
  • Skip link present
  • outline: none usage (red flag)
  • Keyboard test coverage

Section

41. Accessibility

Team & Development