Accessibility best practices for Android TV

Stay organized with collections Save and categorize content based on your preferences.

This guide provides best practices for accessibility on Android TV and provides recommendations for both native and non-native apps.

Why is accessibility important for my TV app?

Vision impairments are not uncommon among the TV-watching population. An estimated 2.2 billion people globally have a vision impairment, according to the World Health Organization (WHO). In the US alone, 32 million Americans 18 and older have experienced significant vision loss, according to the 2018 National Health Interview Survey. In Europe, the estimates point to 30 million blind and partially sighted persons, according to the European Blind Union (EBU).

Most importantly, users with vision impairments enjoy consuming media content just as much as their fully sighted peers. A 2017 survey commissioned by Comcast (US) showed that 96% of users who are blind or have low vision regularly watch TV, with 81% watching more than an hour per day. However, 65% also reported encountering problems with looking up what's on TV and in a 2020 survey in the UK, 80% of disabled people said they had experienced accessibility issues with video on-demand streaming services.

While assistive technologies can and do help users with low vision, it's important to support accessibility in content discovery journeys for TV apps by, for example, paying extra attention to providing navigation guidance and properly labeling elements. Ensuring that TV apps work well with accessibility features like TalkBack has the power to significantly improve the experience for users with vision impairments.

The first step towards improving accessibility is awareness. This guide can help you and your team to uncover accessibility issues with your app on TV.

Android accessibility resources

To learn more about accessibility on Android, see our accessibility development resources.

Text scaling

Android TV apps should respect the user's preference for text scaling by supporting different pixel densities.

Take special care to:

  • Use wrap_content for dimensions in UI components.
  • Ensure that layouts rearrange components as their dimensions change depending on the text scale.
  • Ensure that components still fit on the screen at larger text scales.
  • Change text size units for components that are not flexible (do not use sp).
  • Check the value of FONT_SCALE for adjustment in custom views:

    // Checking font scale with Context
    val scale = resources.configuration.fontScale
    Log.d(TAG, "Text scale is: " + scale)
    

The text scale can be easily changed with the following command:

adb shell settings put system font_scale 1.2f

On Android 12 and above, users are able to alter the text scaling from the device settings.

Keyboard layouts

In Android 13 (API level 33) and higher, you can use getKeyCodeForKeyLocation() to lookup the keycodes for expected key locations. This may be necessary if the user has re-mapped some key locations, or if they are using a chorded keyboard which does not have a typical keyboard layout.

Audio description

In Android 13 (API level 33) and higher, a new system-wide accessibility preference allows users to enable audio descriptions across all apps. Android TV apps can check the user's preferences by querying it with isAudioDescriptionRequested().

Kotlin


private lateinit var accessibilityManager: AccessibilityManager

// In onCreate():
accessibilityManager = getSystemService(AccessibilityManager::class.java)

// Where your media player is initialized
if (am.isAudioDescriptionRequested) {
    // User has requested to enable audio descriptions
}

Java


private AccessibilityManager accessibilityManager;

// In onCreate():
accessibilityManager = getSystemService(AccessibilityManager.class);

// Where your media player is initialized
if(accessibilityManager.isAudioDescriptionRequested()) {
    // User has requested to enable audio descriptions
}

Android TV apps can monitor when a user's preferences change by adding a listener to AccessbilityManager.

Kotlin


private val listener =
    AccessibilityManager.AudioDescriptionRequestedChangeListener { enabled ->
        // Preference changed; reflect its state in your media player
    }

override fun onStart() {
    super.onStart()

    accessibilityManager.addAudioDescriptionRequestedChangeListener(mainExecutor, listener)
}

override fun onStop() {
    super.onStop()

    accessibilityManager.removeAudioDescriptionRequestedChangeListener(listener)
}

Java


private AccessibilityManager.AudioDescriptionRequestedChangeListener listener = enabled -> {
    // Preference changed; reflect its state in your media player
};

@Override
protected void onStart() {
    super.onStart();

    accessibilityManager.addAudioDescriptionRequestedChangeListener(getMainExecutor(), listener);
}

@Override
protected void onStop() {
    super.onStop();

    accessibilityManager.removeAudioDescriptionRequestedChangeListener(listener);
}