
Success criterion 2.1.2
No Keyboard Trap
Keyboard focus should never get stuck on one element; it should always be possible to move it away using only the keyboard.
- Level A
- Principle 2: Operable
- Guideline 2.1: Keyboard Accessible
In a user’s words
“It's like I was stuck in a digital maze, and you handed me the escape key!”
What each role can do
- Product manager
- Make sure keyboard users can navigate through all elements easily.
- Designer
- Indicate keyboard focus clearly and avoid elements that could trap keyboard navigation.
- Developer
- Make sure to provide ways to exit menus or modals via keyboard commands.
- Tester
- Run comprehensive tests to make sure there are no keyboard traps.
Once it is fixed
“Thank you for giving me back control of my keyboard. You're a real lifesaver!”
Share this with your team
The quotes are written to illustrate the criterion. They are not testimonials from real people. For the official wording, find 2.1.2 in the W3C quick reference for WCAG 2.2 (opens in a new tab).
Or press ←the left arrow and →the right arrow.