Level AOperable2.1.2

WCAG 2.1.2: No Keyboard Trap

If keyboard focus can be moved to a component, focus can be moved away using only the keyboard.

ADA Relevance: Level A is the minimum baseline. Failing this criterion is a clear ADA violation and one of the easiest violations for plaintiff attorneys to identify.

Why No Keyboard Trap Matters

A keyboard trap prevents users from navigating away from an element, essentially locking them on a part of the page with no escape.

How to Test for WCAG 2.1.2 Violations

Tab through every interactive element. Verify you can always Tab or Escape out of any component, including modals, embedded content, and custom widgets.

How to Fix WCAG 2.1.2 Violations

Ensure modals can be closed with Escape. Add proper focus management to custom widgets. Test embedded iframes and third-party widgets for keyboard traps.

Industries Most Affected by No Keyboard Trap Violations

These industries commonly fail WCAG 2.1.2 due to the nature of their website content and functionality:

No Keyboard Trap by Platform

Different platforms have different levels of built-in support for WCAG 2.1.2:

WCAG 2.1.2 FAQ

What does WCAG 2.1.2 No Keyboard Trap require?

WCAG 2.1.2 requires that if keyboard focus can be moved to a component, focus can be moved away using only the keyboard. This is a Level A criterion under the Operable principle, meaning it is a minimum baseline requirement.

How do I test for WCAG 2.1.2 violations?

Tab through every interactive element. Verify you can always Tab or Escape out of any component, including modals, embedded content, and custom widgets.

Is WCAG 2.1.2 required for ADA compliance?

Yes. WCAG 2.1.2 is a Level A criterion, and courts consistently reference WCAG 2.1 AA as the standard for ADA compliance. Failing to meet this criterion creates legal exposure for ADA lawsuits, which typically settle for $10,000 to $75,000+.

What happens if my website fails WCAG 2.1.2?

Failing WCAG 2.1.2 No Keyboard Trap means a keyboard trap prevents users from navigating away from an element, essentially locking them on a part of the page with no escape. This violation is detectable by automated scanning tools that ADA plaintiff attorneys use to identify lawsuit targets. ADA CodeFix can scan your site for this specific violation and provide AI-generated code fixes.

Test Your Site for WCAG 2.1.2 Violations

ADA CodeFix automatically scans for No Keyboard Trap violations and provides AI-generated code fixes — not overlay widgets.

Scan Your Site Free
50+ WCAG rules AI code fixes No credit card