Repository navigation
Move the state words to the state description on Android - #59859
Open
faciledictu wants to merge 1 commit into
Open
faciledictu wants to merge 1 commit into
faciledictu wants to merge 1 commit into
Conversation
"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.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Fixes #59856.
On Android,
aria-busy,aria-checked="mixed"andaria-valuetextgo 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
Switchkeeps 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"andaria-valuetextno longer replace the element's name in TalkBackTest Plan:
Added tests to
BaseViewManagerTestandReactSwitchManagerTest. 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.