Android has a number of accessibility features that are directly affected by how you design and build your website or application. These include:
- Talkback – a screen reader that uses spoken feedback to describe your actions and to tell you about alerts and notifications on screen
- Switch Access – enables you to control your device with one or more switches. Useful for people with limited mobility, switch access provides an alternative to using the touch screen
- Large text – allows you to choose your preferred font size by increasing and decreasing the text size on your device
In this post I’ll look at how to use and optimize Talkback for accessibility testing. All testing for the post was done using Nexus 9, version 5.1.1 and should be valid for KitKat (4.4.x) and Lollipop (5.x).
Optimizing Talkback
Before you start using Talkback there are a few useful settings that you’ll need to configure to make testing a little easier. These are accessed via Settings > Talkback > Settings.
- Enable explore by touch – Select ‘Explore by touch’, this makes it possible to navigate by moving your finger across the screen and listening to items being announced. In Android 6 (HTC1) ‘explore by touch’ is turned on automatically when enabling TalkBack.
- Enable enhanced web scripts – Select ‘Enhance web accessibility’, this tells Talkback to provide visual guidance when navigating. Note that this option was deprecated since 4.2 as it was considered experimental.
- Display speech output – On the Developer Settings screen, accessed via a button at the foot of the Talkback Accessibility screen, select ‘Display speech output’. This enables Talkback to display red text at the foot of the screen that mirrors what it is saying.
- Take the ‘Explore by touch’ tutorial -accessed via the Talkback settings screen this is probably the most important thing to do before you get testing as you will learn basic gestures and navigation.
- Accessibility shortcut – Map the Talkback on/off button to the power button via the Settings > Accessibility and enable ‘Accessibility shortcut’. To switch Talkback on/off press the power key until the device vibrates, makes a sound or you see the ‘Power off’ message, then press and hold two fingers on the screen. This should work however I have found it to be a little unreliable. It also takes slightly longer than you think to activate.
Navigation
You can navigate with Talkback either by moving your finger around the screen and listening to what is under your finger being announced (explore by touch) or use gestures and swipe navigation.
Gestures
Core Talkback gestures can be found in the table below (source).
Action | Gesture |
---|---|
Turn Talkback on and off | Press the power key and hold two fingers on screen |
Speak element | Single tap |
Activate an element | Double tap |
Scroll | Two finger slide |
Zoom | One finger triple tap |
Select next item | Swipe right / down |
Select previous | Swipe left / up |
Move to first item on screen | Up then down |
Move to last item on screen | Down then up |
Scroll forward (if you’re on a page longer than one screen) |
Right then left |
Scroll back (if you’re on a page longer than one screen) |
Left then right |
Move slider down (such as volume) |
Left then right |
Home button | Up then left |
Back button | Down then left |
Recent apps | Left then up |
Notifications | Right then down |
Open local context menu | Up then right |
Open global context menu | Down then right |
The global and local context menus
The global and context menus provide shortcuts for navigating certain types of content
The global context menu works across all applications. It can be opened by swiping down and right with one finger, then dragging your finger in a circle to hear the options
The table below list options in the global context menu (source):
Global context menu feature | Description |
---|---|
Quick navigation | Hear all of the items on the screen as you move your finger in a circle. This option isn’t available if you’re using the list version of the context menu instead of the circle version (by enabling “Show Context Menu as list” in Talkback settings). |
Read from top | Hear a read-out of all items on the screen, starting from the top. |
Read last item again | Hear the last verbalization again. |
Spell last item | Hear a letter-by-letter spelling of Talkback’s last verbalization. |
Read from next item | Hear a read-out of all items on the screen, starting from the last focused item. |
Talkback settings | This option is outside the circle menu, at the top-right corner of your screen. Selecting this option opens the Talkback settings screen. |
Text to speech settings | This option is outside the circle menu, at the bottom-right corner of your screen. Selecting this option opens your text-to-speech settings. |
Tip: A useful option when testing is being able to quickly pause Talkback. This can be done via the global context menu. Once the menu is open select ‘Pause Talkback’ positioned in the top left of the screen. This will give you a warning that Talkback will be suspended. Once done you can resume TalkBack by dragging down on the notifications pane and selecting ‘TalkBack is suspended. Tap to resume”. You’ll find that TalkBack is automatically resumed when the lock screen is on; this is so TalkBack users can unlock the device.
The local context menu will change depending on what the focus is on and is opened by swiping up and right with one finger, then dragging your finger in a circle to hear the options
The table below list options in the local context menu (source):
Local context menu feature | Description |
---|---|
Default | Each swipe to the right reads the content of the focused item. |
Page | Each swipe to the right speaks all of the items on the current page. |
Paragraph | Each swipe to the right speaks one paragraph of the currently focused item. |
Line | Each swipe to the right speaks a single line of the currently focused item. |
Word | Each swipe to the right speaks one word of the currently focused item. |
Character | Each swipe to the right speaks one character of the currently focused item. |
When you activate the local context menu from screens other than your home screen, you may hear alternative features outlined in the table below (source):
Local context menu feature | Description |
---|---|
Page navigation | Open a new local context menu with options for moving to the next or previous page. |
Curser control menu | Open a new local context menu with options for moving the cursor and editing text.
|
Links menu | When you navigate to text that contains links, you can open the local context menu, and select the Links submenu to select one of the links included in the text. |
Label controls | edit customized labels for unlabeled content. Sometimes applications are missing labels on images. You can use Talkback to create your own labels for these images, to make it easier to identify them in the future. |
Word | Each swipe to the right speaks one word of the currently focused item. |
Change granularity menu | Select this option to open a new local context menu with the navigation granularity options listed above (Default, Page, Paragraph, Line, Word and Character). |
Browser and Talkback support
The native browser, Chrome, and Talkback has basic support for web browsing. Some of the techniques found in WAI ARIA or HTML5 may not be announced correctly by Talkback.
Firefox for Android has better support for WAI ARIA and HTML5 as well as more robust support for core HTML such as headings, WAI ARIA Landmarks, data tables and so on. As such basic navigation is not supported in Chrome we recommend testing on Firefox for Android. Regardless of how well Talkback supported web content it is important to code to web standards and follow the Web Content Accessibility Guidelines (WCAG).
Using both Chrome and Firefox you can navigate by swiping up, down, left and right to use spatial navigation through screen elements. Using the ‘Quick navigation’ option in the global content menu you can drag your finger in a circle to listen sequentially to all items on screen in the natural focus order. This is a good way to test focus order should swiping be sticky or not work (which I have found happens from time to time).
Firefox
Firefox uses the three-finger swipe to navigate elements. A three-finger swipe up or down cycles between list items (not lists), headings, landmarks, links and form elements such as text inputs and checkboxes. A three-finger swipe left or right moves up or down the page by the selected element:
Firefox also has support for quick navigation keys with Talkback that work with physical keyboards, connected Bluetooth keyboards, or on screen keyboards.
Keystrokes will only work in HTML and not on the browser chrome or in text fields. The following keystrokes move focus to the following elements: (source):
Key | Description |
---|---|
a | anchor |
b | button |
c | combobox or listbox |
e | text entry or password field |
f | form field (button, combobox, text entry, radio button, slider, checkbox) |
g | image |
h | heading |
i | item in an unordered, ordered or definition list |
k | hyperlink |
l | unordered, ordered or definition list |
p | page tab (in ARIA-enabled web apps) |
r | radio button |
s | separator |
t | data table |
x | checkbox |
There is no gesture to navigate by data tables however Firefox will announce the table header together with the focused cell.
Resources
- Android Accessibility
- Android and iOS Accessibility – Paul J Adam
- How to use Talkback in Firefox for Android Accessibility – Mozilla
- Accessibility for Firefox on Android – Marco Zehe
- Accessibility in Firefox for Android – Marco Zehe
- Accessibility features in Firefox for Android – Eitan Isaakson
- Android accessibility the missing manual – Ted Drake
Comments
What version of Android is this based on?
The information should be valid for KitKat (4.4.x) and Lollipop (5.x), probably also Marshmallow (6.x)
As Patrick said. I also use a Nexus 9 tablet running 5.1.1. I’ve updated the post.
Thank you. We just picked up our first Android powered, Samsung Tablet for use as a demo/loan assistive technology device. Just this morning I was going through the various Accessibility features and was a bit overwhelmed. This article could not come at a better time and has saved me a ton of experimentation time. Thanks again.
Glad to hear it John, thanks for the feedback.