Resource guide

2.1.2 No Keyboard Trap

Keyboard focus must never become trapped in a component. Users must always be able to move away.

By Calling All Minds·Last updated April 2026

2.1.2

Success criterion

A

Conformance level

Essential baseline — must meet for any compliance.

What it means

A keyboard trap occurs when a user tabs into a component and cannot tab out of it using standard keystrokes. This leaves keyboard users completely stuck on the page.

If a component uses non-standard keys to navigate out, users must be told this. The exception is modal dialogs, which should trap focus intentionally while they are open, but must release it when closed.

In practice

Test every interactive component, embedded widget, and iframe by navigating into it and attempting to Tab or Shift+Tab out. If you become stuck, that is a trap.

For modal dialogs, trap focus inside the modal while it is open. This is correct behaviour. Provide a clear close button and ensure Escape closes the modal and returns focus to the trigger.

Embedded third-party widgets (chat widgets, maps, media players) are common sources of keyboard traps. Test them carefully.

Common failures

  • Embedded PDF viewer where Tab key navigates inside the PDF but cannot escape back to the page
  • Custom dropdown menu where focus cannot leave the menu without closing it first
  • Third-party chat widget that traps keyboard focus

AXS Audit

AXS Audit checks your site against 2.1.2 and flags issues your team can act on straight away. It covers criteria that automated scanners often miss.

Explore AXS Audit