Skip to content
Anika Henke edited this page Oct 15, 2024 · 7 revisions

2.1.2 No Keyboard Trap

If keyboard focus can be moved to a component of the page using a keyboard interface, then focus can be moved away from that component using only a keyboard interface, and, if it requires more than unmodified arrow or tab keys or other standard exit methods, the user is advised of the method for moving focus away.

When this is applicable

Always.

Check keyboard focus is not trapped

Check you can:

  • tab through all interactive elements using standard keyboard navigation methods
  • activate elements using a keyboard
  • move away from all elements that can be reached with a keyboard
    • it's a fail if you cannot get out of a component
    • any scrolling which is or appears to be infinite is considered a fail, even if the number of tabs is technically finite - for example, users are unlikely to realise they can tab past an excessively long embedded Twitter feed

If you find a keyboard trap, make sure it's not something like a browser extension causing it. You can double check this using incognito mode, a different browser profile or by disabling extensions.

See an example of a keyboard trap.

Exceptions

When the user is advised of a special key combination, it's not a fail if standard keyboard navigation methods do not work but that special key combination does.

It's fine (or even good) if modal windows trap the focus. But you have to be able to get out of them using the Close button or similar.

Potential critical fail

If this Success Criteria fails it means the whole page fails because something interferes with the other content in a way which makes it inaccessible to some people. That includes if third-party content causes this to fail, even if it is otherwise excluded from your testing. See Non-Interference.

Mobile app testing

Use an external keyboard.

Clone this wiki locally