docs: clarify accessible name precedence#1925
Draft
wanxiankai wants to merge 1 commit into
Draft
Conversation
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
Clarify how the
nameoption in*ByRolequeries computes an accessible name in RNTL v14.The docs now list the precedence of labelled-by references, explicit accessibility labels, and fallback content such as image alt text, a root text input placeholder, or child text. They also include an example showing that an explicit
accessibilityLabeltakes precedence over a button's child text.Closes #1923.
Test plan
yarn docs:generateyarn --cwd website validateyarn typecheckyarn test --watchman=false(83 suites, 795 tests, and 236 snapshots passed)yarn lintyarn format:checkyarn buildyarn validatereached Jest but Watchman could not write its macOS LaunchAgent in the sandbox. The complete Jest suite was rerun with Watchman disabled as shown above; the remaining validation commands were run separately and passed.