← All terms

Focus trap

Also known as: Keyboard trap, Focus lock

A web accessibility barrier in which keyboard focus becomes confined to a particular element or region of a page, preventing the user from navigating away using standard keyboard commands. Focus traps are especially problematic for screen reader users and keyboard-only users, who may become completely stuck with no way to reach other page content or controls. WCAG Success Criterion 2.1.2 (No Keyboard Trap) specifically prohibits this barrier. Intentional focus trapping is sometimes used in modal dialogs but must always provide an escape mechanism.

Category: Web Accessibility · Standards

Related: Screen reader · WCAG · Semantic HTML · ARIA · Information wayfinding

Sources