Accessibility testing
Find guidance on how to test dialogs for travellers who use assistive technology.
Keyboard testing
- Use the ‘Tab’ key to navigate to the button that opens the dialog and press ‘Space’ or ‘Enter’ to activate it.
- Check that that focus is on the dialog’s first focusable element (e.g., the close button).
- Use the ‘Tab’ key to move through all focusable elements within the dialog. Make sure each element has a visible focus state.
- Make sure that the focus doesn’t move to elements outside the dialog while it is open, confirming that the focus is locked within. For web applications, the browser's interface should remain accessible.
- Press the ‘ESC’ key to dismiss the dialog. For non-dismissible dialogs, check that the dialog remains open and requires a specific action to be dismissed.
- If the dialog was dismissed, check that the focus returns to the button that launched the dialog.
- Reopen the dialog, navigate to the close button, and press ‘Enter’ or ‘Space’ to activate it, making sure the dialog is dismissed.
Screen reader checks
NVDA on Chrome
- Navigate to the button that opens the dialog.
- Press the ‘Space’ or ‘Enter’ button to activate the button and open the dialog.
- Check that the dialog name and role are announced. For example, “Dialogue box, remove hotel?”.
- Use the up and down arrows to navigate through all elements within the dialog.
- Make sure that NVDA announces each element and you can only reach content contained within the dialog.
- Move to the button to dismiss or cancel the dialog.
- Press ‘Space’ or ‘Enter’ to activate the button and dismiss the dialog.
- Check that the focus returned to the button that launched the dialog.
VoiceOver on Safari
- Navigate to the button that opens the dialog.
- Press ‘CTRL’ + ‘OPT’ + ‘Space’ to activate the button, and open the dialog.
- Check that the dialog name and role are announced. For example, “Remove hotel? web dialog”.
- Use ‘CTRL’ + ‘OPT’ + arrow keys to navigate through all of the elements within the dialog.
- Make sure that you only reach the content contained within the dialog.
- Move to the button to dismiss or cancel the dialog.
- Press ‘CTRL’ + ‘OPT’ + ‘Space’ to activate the button, and dismiss the dialog.
- Check that the focus returned to the button that launched the dialog.
VoiceOver on iOS
- Swipe left or right to navigate to the button that opens the dialog.
- Double-tap anywhere on the screen to activate the button.
- Check that the first element is announced. For example, “Remove hotel? heading”.
- Swipe left and right to ensure you can only reach the content contained within the dialog.
- Swipe to the button to dismiss or cancel.
- Double-tap to close the dialog.
TalkBack on Android
- Swipe left or right to navigate to the button that opens the dialog.
- Double-tap anywhere on the screen to activate the button.
- Check that the first element is announced. For example, “Remove hotel? heading”.
- Swipe left and right to make sure you can only reach the content within the dialog.
- Swipe to the button to dismiss or cancel.
- Double-tap to close the dialog.