Skip to main content
WCAG Patterns

WCAG 2.1.2 · Level A · WCAG 2.0

No Keyboard Trap

Keyboard focus must be able to move away from any component. Modals that swallow Tab/Escape fail this criterion.

Principle
Operable
Guideline
Keyboard Accessible
Level
A
Added in
WCAG 2.0

What it means

Keyboard focus must be able to move away from any component. Modals that swallow Tab/Escape fail this criterion.

This is the short summary — a long-form breakdown (with code examples, common failures, and fix patterns) is queued for this criterion. In the meantime, the official W3C document linked at the end of the page is the authoritative source.

Quick checks

  • Run axe DevTools against the page and filter for rules citing 2.1.2.
  • Navigate the component with Tab + Enter only and confirm nothing is orphaned.
  • Inspect the accessibility tree in DevTools (Accessibility pane in Chrome/Firefox).

Further reading

The authoritative source is the official W3C Understanding document for 2.1.2. Framework-specific patterns and axe-rule mappings land here as the library grows.