UX, Conversion & Accessibility

Keyboard Trap

A keyboard trap occurs when someone navigating with a keyboard can move focus into a component but cannot move focus back out using the keyboard.

A keyboard trap occurs when someone navigating with a keyboard can move focus into a component but cannot move focus back out using the keyboard. It can prevent people who cannot use a mouse from reaching the rest of a page. An embedded booking widget or poorly designed dialog could create this problem. Keyboard traps are different from deliberate focus management inside an open modal: a properly implemented modal should still have an operable way to close or exit it. WCAG includes a No Keyboard Trap requirement. Testing should check forward and backward navigation, activation, and escape behavior without assuming every user follows the same path.