Accessibility testing with Android Talkback

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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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).

ActionGesture
Turn Talkback on and offPress the power key and hold two fingers on screen
Speak elementSingle tap
Activate an elementDouble tap
ScrollTwo finger slide
ZoomOne finger triple tap
Select next itemSwipe right / down
Select previousSwipe left / up
Move to first item on screenUp then down
Move to last item on screenDown 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 buttonUp then left
Back buttonDown then left
Recent appsLeft then up
NotificationsRight then down
Open local context menuUp then right
Open global context menuDown 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 global context menu shown on screen as a circular dial

The table below list options in the global context menu (source):

Global context menu featureDescription
Quick navigationHear 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 topHear a read-out of all items on the screen, starting from the top.
Read last item againHear the last verbalization again.
Spell last itemHear a letter-by-letter spelling of Talkback’s last verbalization.
Read from next itemHear a read-out of all items on the screen, starting from the last focused item.
Talkback settingsThis 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 settingsThis 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 local context menu appears visually on screen shown on screen as a circular dial

The table below list options in the local context menu (source):

Local context menu featureDescription
DefaultEach swipe to the right reads the content of the focused item.
PageEach swipe to the right speaks all of the items on the current page.
ParagraphEach swipe to the right speaks one paragraph of the currently focused item.
LineEach swipe to the right speaks a single line of the currently focused item.
WordEach swipe to the right speaks one word of the currently focused item.
CharacterEach 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 featureDescription
Page navigationOpen a new local context menu with options for moving to the next or previous page.
Curser control menuOpen a new local context menu with options for moving the cursor and editing text.

  • Options in the cursor control menu include: Move cursor to beginning, Move cursor to end, Cut, Copy, Paste, Select all, Start selection mode and End selection mode.
  • To move the cursor while in an edit box, you can tap the volume keys.
Links menuWhen 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 controlsedit 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.
WordEach swipe to the right speaks one word of the currently focused item.
Change granularity menuSelect 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):

KeyDescription
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
iitem in an unordered, ordered or definition list
khyperlink
lunordered, ordered or definition list
ppage tab (in ARIA-enabled web apps)
rradio button
sseparator
tdata table
xcheckbox

There is no gesture to navigate by  data tables however Firefox will announce the table header together with the focused cell.

Resources

 

Categories: Development
Tags: ,

Comments

Greg says:

What version of Android is this based on?

Patrick H. Lauke says:

The information should be valid for KitKat (4.4.x) and Lollipop (5.x), probably also Marshmallow (6.x)

Henny Swan says:

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.

Henny Swan says:

Glad to hear it John, thanks for the feedback.