Keyboard-only testing is a simple and effective way to learn about the accessibility of your interactive page elements. To test for keyboard operability, just find a desktop computer, unplug your mouse, and start using your website or application.
Keyboard tests should shed light on three major accessibility questions:
Does the page use a logical navigation order?
Can a visual user track their place in a page using a focus indicator or outline?
Are there functions or interactions that require a mouse, and don’t work with a keyboard?
Keyboard Testing Techniques
Completing Essential Tasks
Attempt to perform essential tasks using nothing but the keyboard and monitor. Use your Tab and directional arrow keys to move through your page, site, or application.
This test fails if:
you cannot determine your current location because elements lack a visual focus indicator;
an element’s visual focus indicator is different from that used when hovering over the element;
your tab sequence is inconsistent with the intended reading order of the page;
you cannot focus to an interactive or clickable element;
you cannot activate an interactive element (e.g, links, form elements) using the keyboard;
you cannot navigate to a control or widget in a reasonable number (40-60) of keystrokes
Tab/Directional Arrow Traversal
Certain controls and widgets, like popup menus, sliders, and trees, may allow the user to combine tab focus with directional arrows for more efficient navigation and activation. For example, consider this user interaction with a slider:
A user places focus on a slider by tabbing to it;
The user presses the right directional arrow to increase the slider value, and the left arrow to reduce the value;
Requiring a user to traverse dozens or hundreds of tab positions may technically satisfy current accessibility standards, but it misses the mark where functional accessibility is concerned. Where pages contain large numbers of tab indices, developers and designers should take a common sense approach and consider breaking up content into more manageable page units, re-organizing page content for more efficient keyboard traversal, or even purging unnecessary or superfluous content from the page.