fix A11y - Android - The color code also announces when navigating to the header text - #87258
Conversation
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good for product
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
PR ReviewOverall: The approach is sound — explicitly setting Overridability is preserved ✅ — Concerns:
Suggestion: Consider adding a brief inline comment explaining why The only failing check is the reviewer checklist (not yet completed by the reviewer), which is expected. |
@MelvinBot can you do suggestion in code so we can apply? |
MelvinBot
left a comment
There was a problem hiding this comment.
Here's the suggestion with an inline comment explaining the intent:
// On Android, TalkBack reads style metadata (e.g. color codes) along with text content.
// Setting accessibilityLabel explicitly causes TalkBack to read only the label, skipping style info.
accessibilityLabel={typeof children === 'string' && !!children && Platform.OS === 'android' ? children : undefined}
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Co-authored-by: MelvinBot <MelvinBot@users.noreply.github.com>
|
🚧 @dangrous has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/dangrous in version: 9.3.59-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. This is a low-level Android accessibility fix ( |
|
@apeyada This is accessibility testing and Applause will test only Functional testing. |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.3.59-4 🚀
|
Explanation of Change
I ended up setting
accessibilityLabelin low-level Text component (android only) as there are still many places where color code is announced.Fixed Issues
$ #80337
PROPOSAL: #80337 (comment)
Tests
Precondition: Screen reader Talkback is enabled.
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android.mov
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari