What are Keyboard Traps?
By Keith Bundy
WCAG 2.0 guideline 2.1.2 states that there should be no keyboard traps. A keyboard trap occurs when a user can get into a component or element on a web page by using the keyboard but cannot get out of that component or element through the use of the keyboard.
Who Is Affected?
Keyboard traps primarily affect two types of users.
- Users who are blind or who have a significant visual impairment cannot use the mouse for navigation. Consequently, their only method of navigating a web page is by using the keyboard.
- Users who have limited or no use of their hands cannot navigate a page using the mouse. There are several ways in which these individuals can get around a page, but these methods primarily involve keyboard navigation in some form. For example, users of dictation software are actually giving keyboard commands to programs by using their voices.
How Can Keyboard Traps Be Avoided?