Focus Trap

Noun · Development

Definitions

  1. A technique that constrains keyboard focus within a modal dialog or overlay, preventing Tab from reaching elements behind it. Essential for accessibility — without a focus trap, keyboard users can tab to invisible elements behind the modal. Focus should return to the trigger element when the modal closes.

    In plain English: Keeping keyboard navigation locked inside a popup or modal so users can't accidentally interact with hidden content behind it.

    Example: "The modal needs a focus trap — keyboard users can currently tab to the page content behind it, which is confusing and a WCAG violation."

Related Terms