WCAG 2.1.2 No Keyboard Trap

WCAG 2.2 success criterion 2.1.2, No Keyboard Trap, is a Level A requirement: no keyboard trap.

Read the criterion in the W3C Recommendation, WCAG 2.2 (opens in a new tab).

How BearScan checks it

No keyboard trap

Checked automatically: clicks through the page. Severity: blocker. A keyboard trap makes the rest of the page permanently unreachable for a keyboard-only user.

An approximation: A browser presses Tab through the page. If focus stays on one control through Tab, Shift+Tab and Escape, that is a trap. If it loops among a few controls without reaching the rest, that is reported for review, because a modal dialog does it by design. Widgets that open only after a click are not entered, since the walk never activates anything.

How to fix it. Ensure focus can always leave a component using standard keys. For composite widgets, follow the documented pattern for moving focus out.

All WCAG 2.2 criteria · Next: 2.1.4 Character Key Shortcuts

Questions

Is WCAG 2.1.2 required by the ADA?

The ADA doesn't name a technical standard for businesses, but the Justice Department's 2022 guidance points businesses to WCAG, and its 2024 rule for state and local governments adopted WCAG 2.1 Level AA, which includes 2.1.2.

Can an automated tool check WCAG 2.1.2?

Mostly. BearScan checks it automatically (clicks through the page). A clean result still isn't proof every page passes, only the pages scanned.

How do I fix a WCAG 2.1.2 failure?

Ensure focus can always leave a component using standard keys. For composite widgets, follow the documented pattern for moving focus out.