Operable · Level A · Introduced in WCAG 2.0

WCAG 2.1.2: No Keyboard Trap

Published by whatisADA / Grow Wild Agency · Updated

What this criterion means

People must be able to leave any component they can enter with a keyboard. If exiting needs an unusual method beyond standard keys or exit conventions, explain that method to the user.

A practical example

An embedded editor captures Tab to indent code. Give the editor a documented keyboard exit method, or a mode that lets Tab leave, so users can still reach the controls following it.

How to check it

  1. Enter each custom component and embedded frame using only keyboard navigation.
  2. Try forward and reverse navigation and any documented standard exit mechanism.
  3. For dialogs, verify that an operable close action releases the contained focus and returns it to an appropriate location.

What can be missed

A modal can intentionally contain focus while open, provided keyboard users can close or otherwise exit it. An unexplained trap is an interference problem even if the component is not central to the page.

Record your test

Use this worksheet to record what you actually checked. Notes stay on this device when you choose Save; they are not sent to us. Avoid personal or confidential information on shared devices.

These are your observations, not automated results or a conformance certificate. A complete evaluation needs appropriate scope, supported technologies, all applicable criteria and relevant page states.

Primary sources and scope

This is independent implementation guidance with original examples. The linked standard contains the full definitions, exceptions and conformance requirements. A criterion or checklist alone does not establish legal applicability or whole-site conformance.