Back to Learn
Pulseaccessibility

User Focus Is Not Trapped in a Region

What This Audit Checks

This manual audit checks that keyboard focus is never permanently trapped inside a component. Users must always be able to tab or Escape out of any region on the page. Intentional focus traps (like modals) must provide a clear exit mechanism.

Why It Matters

A focus trap locks keyboard users inside a component with no way to reach the rest of the page. They cannot navigate to the address bar, other page elements, or browser controls. This effectively makes the page unusable for anyone not using a mouse.

How to Fix It

  • Add an Escape key handler to modal dialogs and other intentional focus traps so users can close them:
    dialog.addEventListener('keydown', (e) => {
      if (e.key === 'Escape') closeDialog();
    });
    
  • Provide a visible close button in modals and overlays that returns focus to the triggering element.
  • Never trap focus in non-modal components like dropdowns, tooltips, or sidebars. Users should be able to tab past them.
  • Test by tabbing through every interactive component. If you cannot leave a region using Tab and Shift+Tab, you have an unintentional focus trap.

How Pulse Tracks This

Pulse flags this audit in your Lighthouse accessibility score. When the audit fails, Pulse shows which elements triggered it so you can fix them directly.

Resources