Skip to content

Android: aria-busy, aria-checked="mixed" and aria-valuetext replace the element's name in TalkBack #59856

Open

Description

@faciledictu

Description

On Android, busy, checked: 'mixed' and accessibilityValue.text (and their aria-* props) are written into the view's contentDescription (BaseViewManager.java#L466-L498). Without an accessibilityLabel the description is only these words, and TalkBack reads it instead of the element's text:

  • <Pressable aria-busy><Text>Results</Text></Pressable> is read as "busy".
  • <Pressable role="checkbox" aria-checked="mixed"><Text>Select all</Text></Pressable> is read as "mixed", with no name.
  • <View accessible role="slider" aria-valuetext="3 of 5" ...><Text>Rating</Text></View> is read as "3 of 5".
  • <Text aria-busy>Saving</Text> is read as "busy".

iOS keeps the name and reads these words as the value. On Android they belong in stateDescription. I'll send a fix once #59009 and #58825, which add stateDescription for checked, are settled.

This is the bug #59816 mentions for aria-busy and aria-checked="mixed".

Steps to reproduce

  1. Run the reproducer from ReproducerApp: yarn install, then yarn android.
  2. Turn on TalkBack and go through the sections. In each one, the second element is the same without the prop.

Expected: the name is read together with the state or value, as on iOS.

Actual: only "busy", "mixed" or the value text is read. The second element is read by its name.

React Native Version

0.88.0

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info

Same as in #59377.

Stacktrace or Logs

No crash or warning.

MANDATORY Reproducer

https://github.com/faciledictu/rn-a11y-state-words-repro

Screenshots and Videos

The reproducer's README has the result for each section.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions