2.1.1 Keyboard and 2.1.2 No Keyboard Trap are level A success criteria in the Web Content Accessibility Guidelines (WCAG). They are related to the use of keyboards on websites.
Guideline 2.1.1 states that all functionality of the content is operable through a keyboard interface, except where the underlying function of the content requires input that depends on the path of a user’s movement.
Guideline 2.1.2 states that if keyboard focus can be moved to a component of the page using a keyboard interface, then focus can also be moved away from that component using a keyboard interface.
Why are these important?
The intent of Success Criterion 2.1.1 is to ensure that users can navigate a website using only a keyboard or alternate keyboard (e.g. keyboard interface). This is very helpful for people with motor disabilities who may have a difficult time using a standard mouse. People who are blind or have low vision also benefit from a keyboard-friendly website design; they can use a keyboard in conjunction with a screen reader to minimise problems with finding or tracking a pointer on screen.
The intent of Success Criterion 2.1.2 is to ensure that keyboard focus is not trapped by any section of the content of the web page. This is very helpful for all people with disabilities that rely on a keyboard or keyboard interface to use a site. If their keyboard focus is stuck in a particular section and they are unable to remove it, they will not be able to use the site or navigate its content.
What are the exceptions?
2.1.1 Keyboard allows exceptions when dealing with functions that require path dependent input, such as painting programs, drawing programs, and games that must be played with a pointing device. However, programs such as these are unable to pass Level AAA Success Criterion 2.1.3 Keyboard (No Exception).
2.1.2 No Keyboard Trap allows exceptions when users are informed on how to leave the subsection of the content they have been restricted to. For example, tabbing from the last control in a dialog window causes keyboard focus to return to the first control in the window, therefore trapping focus, but the window contains Cancel and OK buttons that can dismiss it.
In conclusion, keyboard accessibility is one of the most important aspects of digital inclusion and many users rely on it. Everyone should be able to perform tasks and easily navigate a website using just a keyboard.
How can IA Labs help?
As part of our consultations, accessibility audits, and training sessions, we can explain all the contextual nuances that would apply to the WCAG 2.1 Success Criteria 2.1.1 Keyboard and 2.1.2 No Keyboard Trap. If you have any questions or need help with any digital accessibility issue, please don’t hesitate to contact IA Labs.