Search Menu
Language Menu
Mobile Menu
OGCIO

8.11 WCAG 2.1 Success Criterion 2.1.2 − No Keyboard Trap

Often people with disabilities can only use a keyboard to control a webpage. Ensure the keyboard can be used to control or dismiss dialogue boxes, popups or other windows.

Before Rectification

A webpage sample with a layer overlapping the main content, and no discernable way to dismiss it.

Websites often have popup windows, such as for help content as shown in this example. A keyboard user may become trapped in the popup without an easy way to return to the main content.

After Rectification

A webpage sample with a overlay containing a 'Close' button.

By incorporating a Close button in the popup window, users can escape the trap of that window by using the Tab key to move to the Close button and press Enter.

WCAG 2.1 Reference:

https://www.w3.org/WAI/WCAG21/Understanding/no-keyboard-trap