Accessibility testing
Find guidance on how to test accordions for travellers who use assistive technology.
Keyboard Testing
- Use the ‘Tab’ key to navigate to the accordion.
- Make sure the accordion receives focus and the expected focus state is presented.
- Press ‘Space’ or ‘Enter’ to open or close the accordion.
- Check that the accordion opens and closes as expected and that the expected information is displayed or hidden from view.
- Check that the focus has remained on the accordion control.
Screen Reader Checks
NVDA on Chrome
- Navigate to the accordion to test. This can be done in two ways:
- Open the elements list by pressing the ‘NVDA’ key + ‘F7’ and using the arrow keys to move to the ‘Buttons’ menu.
- Press ‘B’ to move to the accordion (button).
- Check that the accordion’s name, role, and state are announced. For example, “Journey duration, button, expanded.”
- Press ‘Space’ or ‘Enter’ to open or close the accordion.
- Check that the state has been updated and is correctly announced as either ‘collapsed’ or ‘expanded.’
VoiceOver & Safari
- Navigate to the accordion to test. This can be done in two ways:
- Open the rotor by pressing ‘CTRL’ + ‘OPT’ + ‘U’ and use the arrow keys to move to the ‘Form Controls’ menu.
- Press ‘CTRL’ + ‘OPT’ + ‘CMD’ + ‘J’ to move to the accordion (button).
- Check that the accordion’s name, role, and state are announced. For example, “Journey duration, collapsed, button.”
- Press ‘CTRL’ + ‘OPT’ + ‘SPACE’ to open or close the accordion.
- Check that the state has been updated and is correctly announced as either ‘collapsed’ or ‘expanded.’
- Press ‘CTRL’ + ‘OPT’ + right arrow to check that the next available content is announced correctly.
VoiceOver on iOS
- Swipe left or right to navigate to the accordion.
- Check that the accordion’s name, role and state are announced. For example, “Journey duration, collapsed, button.”
- Double-tap anywhere on the screen to activate the accordion button.
- Check that the feedback is correct, including the change in state announcement.
TalkBack on Android
- Swipe left or right to navigate to the accordion.
- Check that the accordion’s name, role, and state are announced. For example, “Journey duration, button, expanded.”
- Double-tap anywhere on the screen to activate the accordion button.
- Check that the feedback is correct, including the change in state announcement.