2.1: Keyboard Accessible
Guideline 2.1: Make all functionality available from a keyboard.
While this is one of the most straight forward guidelines, many web applications do not follow it. This guideline requires that you make all functionality available only by the use of the keyboard.
2.1.1: Keyboard (Level A)
All functionality of the content is operable through a keyboard interface without requiring specific timings for individual keystrokes, except where the underlying function requires input that depends on the path of the user's movement and not just the endpoints. (Level A)
There are two major reasons why keyboard operation should be available at all times. Keyboard alternatives, such as a mouse, which require hand-eye coordination are not useful for people with visual impairment. Also, for those, who cannot use the keyboard itself, when a web application is accessible by the keyboard, it is easy to switch out the keyboard to any other navigation devices or substitute it with a software, such as a voice recognition system.
The best way to make sure if this success criterion is met is to unplug your mouse and go through the functionality of your web application.
Timing is allowed in certain scenarios, if a function cannot be done in any other way. Timing means that a key has to be held down for a given amount of time, or it has to be pressed repeatedly within a given time frame.
Also, the exclusive use of a pointing device is allowed, when exact movements are important. Drawing or complex navigation would, for example, fall into this category.
It is also important that being operable by the keyboard means that functionality should be achieved within a reasonable amount of time. For example, if it takes one mouse click to carry out an action, it is not a keyboard equivalent if the user has to go through a long series of keystrokes to achieve the same.
2.1.2: No Keyboard Trap (Level A)
If keyboard focus can be moved to a component of the page using a keyboard interface, then focus can be moved away from that component using only a keyboard interface, and, if it requires more than unmodified arrow or tab keys or other standard exit methods, the user is advised of the method for moving focus away. (Level A)
The previous success criteria was about being able to access all functionality just by using the keyboard. This one extends to everything else that requires the keyboard.
There are many instances where the keyboard is not necessarily used for a certain functionality, rather, to obtain information. For example, you can tab into a read-only field where you get more information about something or an error message.
Every time you allow the user to go to any part of your web application, allow to go back to the original location only by using the keyboard. It might be that you cannot navigate away from a page element just by using the tab and arrow keys. In this case, provide the user with exact instructions of how to navigate away.
2.1.3: Keyboard (No Exception) (Level AAA)
All functionality of the content is operable through a keyboard interface without requiring specific timings for individual keystrokes. (Level AAA)
It is very similar to 2.1.1 with the exception that timing is not allowed. This means that keyboard access should be set up in a way that users are not required to hold down a key for a specific amount of time, or they don't have to press a key at a given frequency.
You are still allowed to have features which are only available with a pointing device, if this feature cannot be achieved in any other way. This includes visual navigation or drawing.