Keyboard trap

Link to Keyboard trap copied to clipboard

keyboard-trap

Rule

Keyboard focus MUST NOT be locked or trapped in a particular page element and the user MUST be able to navigate to and from all navigable page elements using only a keyboard.

Background

Sometimes custom widgets, plugins, embedded applications, and other content formats can create a keyboard "trap" where the keyboard focus gets stuck in one place or within a widget or application. Keyboard traps can make interacting with web content extremely difficult or impossible for keyboard users. Keyboard users must be able to move into, and away from, any user interface component, simply by using their keyboard. When keyboard traps are removed, people who rely on a keyboard will be able to access all of the otherwise-accessible content.

How to Fix

Fix this issue by understanding where the keyboard traps is occurring and using a technique such as:

  1. Make sure the way to navigate through a particular section of the page (usually the Tab key) can move past that section.
  2. Create a keyboard stroke to exit the section (you must provide instructions for this to users).