Repository navigation
fix(button): apply accessibility props and loading to the pressable - #5225
datsiuk-ck wants to merge 2 commits into
Conversation
|
Found potential problems with the pull request:
|
|
/review |
Apex Sentinel · ✅ Approve · review of
|
| Where | Finding |
|---|---|
docs/6.x/docs/guides/migration.md:310 |
Migration guide still says accessibilityRole of Button became role |
Not in the reviewers' prompt (1 file)
src/components/__tests__/__snapshots__/Button.test.tsx.snap: generated or a lockfile, so its lines were left out
3 findings below minor hidden (user_settings.min_severity).
Reviewed with this repository's own Sentinel configuration (677ab9f2b2cf).
💬 Talking to Sentinel
In a finding's thread, reply with:
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 59f05a2. The verdict and the full list are in the summary comment.
|
Thanks, the fix works on all three platforms. Three things before merging:
|
|
Motivation
Buttonpassed every prop it doesn't name to its outerSurface, soaccessibilityLabel,accessibilityStateand thearia-*states missed the pressable, and a loading button wasn't busy (its spinner was a separate progress item). They now reach the pressable, and the spinner is hidden from assistive technology.On Android, React Native writes busy into the content description TalkBack reads, so a plain-text button is labelled by its text there and busy is always
true/false; otherwise TalkBack reads "busy" instead of the text, and keeps reading it after loading ends.Related issue
Closes #5216
Test plan
mainvs this branch, TalkBack, iOS Accessibility Inspector, Chrome: the issue's button is one item, "Save draft", busy;loadingon/off reads "Uploading, busy" then "Upload"; unchanged buttons read the same. Unit tests cover each case.