An Element that causes a focus trap for arrow keys or tab focus was detected.
| Field | Value |
|---|---|
| Rule code | Manual_FocusTrap_Detected |
| WCAG conformance level | A |
| WCAG success criterion | 2.1.2 No Keyboard Trap |
| Must be fixed at source | No |
Description
An element was detected that traps keyboard focus, preventing users from navigating away using Tab, Shift+Tab, or arrow keys. When focus becomes trapped, keyboard and assistive technology users cannot move to other interactive elements or exit the component, effectively locking them in place. This creates a critical barrier for users who rely solely on keyboard navigation, as they may be unable to continue using the page without refreshing or using a pointing device.
How to fix
Ensure users can always move focus away from any interactive element using standard keyboard methods such as Tab, Shift+Tab, or arrow keys. If a component intentionally restricts focus movement, such as a modal dialog, provide an accessible exit mechanism like a close button or the Escape key. When non-standard keys are required to move focus away, inform users of the exit method before or upon entering the component. Verify the fix by navigating to the element using only a keyboard and confirming you can move focus away without becoming stuck.