Skip to content

docs: clarify accessible name precedence#1925

Draft
wanxiankai wants to merge 1 commit into
callstack:mainfrom
wanxiankai:docs/clarify-by-role-accessible-name
Draft

docs: clarify accessible name precedence#1925
wanxiankai wants to merge 1 commit into
callstack:mainfrom
wanxiankai:docs/clarify-by-role-accessible-name

Conversation

@wanxiankai

Copy link
Copy Markdown

Summary

Clarify how the name option in *ByRole queries 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 accessibilityLabel takes precedence over a button's child text.

Closes #1923.

Test plan

  • yarn docs:generate
  • yarn --cwd website validate
  • yarn typecheck
  • yarn test --watchman=false (83 suites, 795 tests, and 236 snapshots passed)
  • yarn lint
  • yarn format:check
  • yarn build

yarn validate reached 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

*ByRole queries with name option does not find elements based on text content in v14

1 participant