Keyboard navigation
Keyboard navigation is a key aspect of web accessibility as it allows users who cannot use a mouse to navigate a website using only their keyboard. Testing if a website is keyboard navigable and meets the Web Content Accessibility Guidelines (WCAG) 2.2 standards involves using keyboard-only navigation to check if all interactive elements are accessible and operable using a keyboard.
Tips for conducting keyboard testing
To conduct keyboard testing for web accessibility, you can follow these steps:
- Ensure that the website can be navigated using only the keyboard: Users should be able to access all content and functionality using only the keyboard, without the need for a mouse or other pointing device.
- Check the tab order: The tab order should be logical and follow the visual layout of the page. Use the tab key to navigate through the page and make sure the focus is moving in the expected order.
- Test the keyboard shortcuts: If the website includes keyboard shortcuts, test them to make sure they work as expected. Ensure that they don't conflict with standard keyboard shortcuts used by the user's operating system.
- Check the focus indicators: Ensure that there are clear focus indicators that show which element on the page currently has focus. This is important for users who rely on the keyboard to navigate.
- Test with screen readers: Use a screen reader to test the website's keyboard accessibility. Screen readers can provide audible feedback to users who are unable to see the screen and can also help identify any issues with keyboard accessibility.
How-to test
- Unplug your mouse (Optional).
- Use a keyboard alone to navigate the user interface. Press the Tab key to work down the page/screen, and Shift-tab to work up the page/screen. Ensure content can be tabbed through in a logical and hierarchal order.
- Pay attention to the focus indicator. This indicator is used to help users browsing with a keyboard know where they are in the page. If the focus indicator disappears, then it is not keyboard accessible.
- Check that all links/buttons/form fields can be focused and activated with the keyboard. You need to press 'Enter' or 'Spacebar' to activate controls. Some controls, like radio buttons and drop-down lists, will require you to use the arrow keys.
Example:
Web Content Accessibility Guidelines success criteria
Resources
Support
If you need any assistance or have questions about the information on this page, please email us at digital.accessibility@customerservice.nsw.gov.au. To report an accessibility barrier with NSW Government’s online content, use our web accessibility report form.