Skip to content

Move the state words to the state description on Android - #59859

Open
faciledictu wants to merge 1 commit into
react:mainfrom
faciledictu:fix/android-state-description
Open

faciledictu wants to merge 1 commit into
react:mainfrom
faciledictu:fix/android-state-description

Conversation

@faciledictu

Copy link
Copy Markdown
Contributor

Summary:

Fixes #59856.

On Android, aria-busy, aria-checked="mixed" and aria-valuetext go into the content description, which replaces the name TalkBack reads from the children: <Pressable aria-busy><Text>Results</Text></Pressable> is read as "busy".

They now go to the state description, and the content description keeps only the label. Android 10 and lower have no state description, so nothing changes there. A Switch keeps its own state description.

#59009 and #58825 set the state description for checked; happy to rebase on whichever lands first. #59840 changes the same file; whichever lands second updates two of its tests.

Changelog:

[ANDROID] [FIXED] - aria-busy, aria-checked="mixed" and aria-valuetext no longer replace the element's name in TalkBack

Test Plan:

Added tests to BaseViewManagerTest and ReactSwitchManagerTest. Checked on Android with https://github.com/faciledictu/rn-a11y-state-words-repro: each element keeps its name, with the words in its state description.

"busy", "mixed" and accessibilityValue.text went into the content description, so with no accessibilityLabel they replaced the name Android builds from the view's text or its children's text. On API 30+ they now go to the view's state description and the content description keeps only the label. A state description that the view sets itself, as a switch does, is left alone.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 8, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Nov 8, 2026

This branch has not been deployed

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant