2.1.2
No Keyboard Trap

You can remove focus from any element with your keyboard

Ensure that users can navigate away from any component using only the keyboard, and provide guidance if non-standard methods are required.

Acceptance Criteria

Keyboard Navigation: Users must be able to move focus away from any component using only the keyboard.

Guidance for Non-Standard Methods: If non-standard keyboard methods are needed to exit a component, users should be informed.

Examples

• A modal dialog should allow users to close it with the keyboard, such as by pressing the “Esc” key.

• An interactive form should let users navigate away from input fields using standard tab keys.

• A custom dropdown should provide keyboard instructions if it requires specific keys to close.

Exceptions

Tips

• Test all interactive elements to ensure they can be navigated away from using only the keyboard.

• Provide clear instructions if exiting a component requires non-standard keyboard actions.

How to test?

1. Focus Navigation: Use the keyboard to navigate to and away from all interactive elements.

2. Exit Methods: Verify that all elements can be exited with standard keyboard methods or check if instructions are provided for alternative methods.

3. Documentation Review: Ensure that any non-standard exit methods are clearly documented for users.