6.1: Exploring accessibility in Android

Contents:

Android apps should be usable by everyone, including people with disabilities.

Common disabilities that can affect a person's use of an Android device include blindness, low vision, color blindness, deafness or hearing loss, and restricted motor skills. When you develop your apps with accessibility in mind, you make the user experience better not only for users with these disabilities, but also for all of your other users.

In this lesson, you explore the features Android provides on the device to enable accessibility, including Google TalkBack (Android's screen reader) and other options in the Android framework.

Note: This practical describes the accessibility features in Android 7 (Nougat). Your device or version of Android may not have all these options, or the options may have different names.

What you should already KNOW

You should be familiar with:

  • How to navigate an Android device.

What you will LEARN

You will learn how to:

  • Turn on TalkBack and navigate the Google user interface with TalkBack enabled.
  • Enable other accessibility settings to customize your device.

What you will DO

  • Experiment with the various accessibility settings on an Android device.

App overview

For this lesson you use the built-in Android settings and apps. You do not build an app.

Task 1. Explore TalkBack and text-to-speech

TalkBack is Android's built-in screen reader. With TalkBack enabled, the user can interact with their Android device without seeing the screen, because Android describes screen elements aloud. Users with visual impairments might rely on TalkBack to use your app.

In this task, you enable TalkBack to understand how screen readers work and how to navigate apps.

Note: By default, TalkBack is unavailable in the Android emulator and in some older devices. The source for the TalkBack feature is available on GitHub. To test TalkBack on the emulator or on a device without TalkBack, download and build the source.

1.1 Turn on TalkBack

  1. On an Android device or emulator, navigate to Settings > Accessibility > TalkBack.
  2. Tap the On/Off toggle button to turn on TalkBack.
  3. Tap OK to confirm permissions.
  4. Confirm your device password, if asked.

    If this is the first time you've run TalkBack, a tutorial launches. (The tutorial may not be available on older devices.) Use the tutorial to learn about:

    • Explore by touch: TalkBack identifies every item you touch on the screen. You can touch items individually or move your finger over the screen. Swipe left or right to explore the items in tab (focus) order. The currently selected item has a green border around the view. To activate the selected item (the last item heard), double-tap it.
    • Scrolling. Lists can be scrolled with a two finger scroll, or you can jump forward or back in a list with a side-by-side swipe.
    • Finding global and local TalkBack menus.
    • Setting the text navigation rate: Swipe up or down as TalkBack reads text to you a character, word, line, or paragraph at a time.
    • Activating EditText views and entering text.

    It may be helpful to navigate the tutorial with your eyes closed. To open the tutorial again in the future, navigate to Settings > Accessibility > TalkBack > Settings > Launch TalkBack tutorial.

1.2 Explore apps with TalkBack

With TalkBack enabled, explore the Camera and Calculator apps with these steps:

  1. Tap the Home button, then double-tap the button to activate it and return to the Home screen.
  2. Tap the Camera icon, then double-tap to activate it.
  3. Explore the various buttons and options in the Camera app. TalkBack identifies each button and control by its function (for example, "Shutter Button" or "Zoom Out" button), not by its appearance ("plus button").
  4. Tap the Home button, then double-tap the button to activate it and return to the Home screen.
  5. Navigate to the Apps screen and activate the Calculator app.
  6. Swipe right with one finger to navigate the views on the screen. Navigation in the app is not strictly left-to-right and top-to-bottom. All the numbers in the leftmost panel are identified before all the operations in the middle panel.
  7. Keep swiping right to navigate to the advanced options screen, which is a panel in green that moves out from the right. Swipe left and double-tap to activate the main view and close the advanced operations. Note how these panel views do not have visible labels, but are identified by purpose in TalkBack.
  8. Perform the calculation 3 times 5. TalkBack reads the numbers, the operation as the numbers are multiplied, and the result.
  9. Navigate back to Settings > Accessibility > TalkBack, and turn off TalkBack. TIP:</strong> To scroll in TalkBack, use a two-finger swipe gesture.

1.3 Other speech settings

TalkBack is the most comprehensive of Android's screen reader functions. Besides TalkBack, Android provides other features for on-demand screen reading.

  1. Navigate to Settings > Accessibility > Select to Speak. If you don't see Select to Speak, go to Google Play to download the latest version of TalkBack.
  2. Tap the On/Off toggle button.
  3. Tap OK to confirm permissions.
  4. Confirm your device password, if asked.

    A speech button appears in the lower right corner of the screen. Select to Speak works similarly to TalkBack, but Select to Speak works only on user-selected parts of the screen, and only by request.

  5. Tap the speech button, then tap to select a portion of the text on the screen. Android reads that text to you.

  6. Tap the Back button to return to the main Accessibility settings page.
  7. Tap the speech button, then select a portion of the screen. Android reads all the text in the selection.
  8. Tap Select to Speak. Turn the toggle button off.
  9. Tap the Back button, then scroll down and tap Accessibility shortcut.

    This option lets you use the device buttons to enable TalkBack by holding down the power button and then touching and holding two fingers on the screen. To disable TalkBack again, you must go to Settings > Accessibility and turn it off manually.

  10. Tap the Back button, then scroll down to Text-to-Speech output. Tap that item.

    The Google text-to-speech engine is used for TalkBack and other text-to-speech functions in apps that support speech-to-text. On this screen you can configure the settings for speech rate and pitch. You can also configure the speech language, change the language, and install new language packs. (To see all the options, tap the gear icon on the Text-to-Speech output screen.)

Task 2. Explore other settings

TalkBack, Select to Speak, and the text-to-speech engine are helpful for users with visual impairments. Android provides several other accessibility features. In this task, you explore some of these other options.

2.1 Explore magnification, font, and display

  1. On an Android device or emulator, navigate to Settings > Accessibility > Magnification gesture.
  2. Tap the On/Off toggle button.

    To use the magnification gesture, tap three times on the screen. Android zooms into the spot where you tapped, providing a magnified view. Tap again three times to exit magnification mode.

  3. Tap the Back button to return to the accessibility settings.

  4. Tap Font size. Move the slider all the way to the right to increase the font size to the largest setting. The preview at the top of the screen shows text at the chosen size.

    A larger font size can make apps easier to read. A larger font size may cause app elements to also be larger or to wrap in unexpected ways.

    Note: These font-size changes only affect apps that use the Android font system. In particular, the enlarged font size does not apply to the Chrome web browser. To enlarge the font for web pages, use Chrome > Options menu > Settings > Accessibility > Text scaling.
  5. Return to the Home screen and examine the effect of the larger font in several apps. Try messages, email, calendar, or any of the apps you've created in this course. Note that apps that use their own internal fonts, such as some games, may not enlarge with this setting.

  6. Navigate back to Settings > Accessibility > Font size and return the font size to the default.
  7. Tap the Back button, select Display size, and move the slider all the way to the right.

    Enlarging the display size makes all elements on the screen larger, including the text. Fewer elements fit on the screen. Enlarging the display size can make apps easier to read, and it also makes buttons and other interactive elements easier to tap.

  8. Return the slider in the Display size settings to the default position.

2.2 Explore color and contrast

  1. Tap Settings > Accessibility > High contrast text.

    High contrast text fixes the display text to be either black or white, depending on the background, and outlines the text to emphasize it. High contrast text can make text easier to read.

    Note: High contrast text is an experimental feature and may not work in all apps.
  2. Return to the Home screen. See how text appears in messages, email, calendar, or any of the apps you've created in this course.

  3. Return to Settings > Accessibility and turn High contrast text off again.
  4. Scroll down to Color inversion and tap to turn it on.

    Color inversion reverses the colors on your screen. For example, black text on a white screen becomes white text on a black screen. Color inversion can make some text easier to read and reduce eye strain.

  5. Return to the Home screen and try some apps with inverted colors.

  6. Swipe from the top of the screen to open the navigation drawer. Click the down arrow to open the quick settings.
  7. Tap Invert colors to disable color inversion.
  8. Navigate to Settings > Accessibility > Color Correction.

    Color correction changes the system colors to help users with various forms of color blindness distinguish screen elements.

  9. Tap the On/Off toggle button.

  10. Navigate to the Home screen and note the differences in system colors.
  11. Return to the Color Correction setting and tap to turn it off.

High contrast text, Color inversion, and Color correction are experimental features in Android. The features may not work in all apps and may affect app performance.

In the next practical, you learn how to support accessibility features in your own apps.

Solution code

No project for this practical.

Coding challenge

Note: All coding challenges are optional.

Challenge: Download and build the RecyclerView app, if you have not already done so. Run the RecyclerView app with TalkBack enabled, and note where you could improve the label text and feedback.

Summary

  • An accessible app works well for all users, including users with low vision, blindness, deafness or hearing loss, cognitive impairments, or motor impairments.
  • On an Android device, all accessibility features are available under Settings > Accessibility.
  • With TalkBack enabled, users can interact with their Android device without seeing the screen, because Android describes various screen elements aloud. Users with visual impairments may rely on TalkBack when they use your app.
  • The TalkBack "explore by touch" feature identifies the element under a user's finger.
  • In TalkBack, swiping left or right identifies the next element to the user. Which element is next depends on the focus order, which is generally from left to right and top to bottom. If you don't want the default, you can define focus order for elements.
  • Select To Speak works similarly to TalkBack, but only by request, and only for specific parts of the screen. To identify those parts of the screen, click the Speech button. Then tap or drag a selection on the screen.
  • The Accessibility shortcut enables the user to turn on TalkBack quickly, without needing to navigate to the settings pages.
  • The Text-to-speech output settings provide options for the Google text-to-speech engine, which TalkBack uses.
  • Magnification gestures enable the user to magnify portions of the screen by tapping three times.
  • Font and display-size settings can be used to enlarge the default system text or all app elements.
  • The high-contrast-text setting fixes the display text to be either black or white, depending on the background, and outlines the text to emphasize it.
  • The color-inversion setting reverses the colors on your screen.
  • The color-correction setting changes the system colors to help users with various forms of color blindness distinguish screen elements.

The related concept documentation is in Accessibility.

Learn more

Android support documentation:

Other:

results matching ""

    No results matching ""