2.1.2 No Keyboard Trap
Level A Since WCAG 2.0 How it is checked: Robot
In plain language
If you can Tab into part of a page (an embed, a media player, a dialog), you must also be able to get back out with the keyboard.
Who is affected
- People with motor disabilities using only a keyboard
- Blind people using screen readers
Examples
Fails
You Tab into an embedded map or a text editor and cannot get out without reloading the page.
Passes
Tab/Shift+Tab move through normally; dialogs close with Esc and return focus to where it was.
How to fix
- Do not block the Tab key in custom components.
- Dialogs: keep focus inside while open, but let users close them with Esc or a Close button.
- Third-party components: explain how to get out if a special key is needed.
How to test it yourself
- Tab through the whole page: does focus get stuck anywhere with no way out? (the WCAG.win robot flags "possible keyboard trap")
What WCAG.win checks
WCAG.win checks part of this criterion automatically. The rest still needs a person.
- Robot: Presses Tab through the whole page and reports places where focus gets stuck (possible keyboard trap).
W3C documentation: Understanding Success Criterion 2.1.2: No Keyboard Trap