Repository navigation
fix: Expose empty receipt upload as an accessible button - #104528
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@lakchote I’ve opened this separate PR for the |
|
@mjasikowski Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1684cdf19d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| {({openPicker}) => ( | ||
| <Wrapper | ||
| accessibilityRole="imagebutton" | ||
| accessibilityRole={isInteractive ? 'button' : undefined} |
There was a problem hiding this comment.
Keep alternative links outside the upload button
Once alternative methods load in an editable wide RHP on web, this role makes GenericPressable render a native <button> (src/components/Pressable/GenericPressable/implementation/index.tsx:16-18), but that button still contains ReceiptAlternativeMethods at line 183, including the mail TextLink rendered by ReceiptAlternativeMethods.tsx:67-77. Nesting a focusable link inside a native button is invalid and causes assistive technologies to flatten or hide the descendant action, so render the alternative methods as a sibling of the upload button instead.
Useful? React with 👍 / 👎.
|
Thanks for splitting this out. The Codex comment about the alternative methods is real (#104528 (comment)). With |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@lakchote The nested-link correction is pushed. The full diff is now 172 changed lines, including tests and JSX reindent, exceeding the C+ small-fix limit. Can we continue here, or should I report the original accessibility issue in #expensify-bugs and close this PR? |
|
LGTM. @lakchote do you want to review this too? |
|
Yes, thank you @mjasikowski Thanks @nyomanjyotisa, we'll merge this one as is. Please still report the original accessibility issue in #expensify-bugs. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
🚧 lakchote 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/lakchote in version: 9.5.16-0 🚀
|
|
No help site update needed. This PR only changes the accessibility role of the empty receipt upload control. The visible labels, layout, and upload behavior stay the same, so no sentence in |
|
🚀 Deployed to staging by https://github.com/lakchote in version: 9.5.18-0 🚀
|
|
No help site update needed. This PR only changes the screen reader role of the empty receipt upload area. The labels, layout, and upload behavior stay the same, so no sentence in |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.5.18-1 🚀
Bundle Size Analysis (Sentry): |
|
@MelvinBot please create the missing issue for this approved, merged fix. Use the standard template, link the PR and approval, and assign me. |
|
Created Upload receipt control is not exposed as a button to screen readers using the standard template, linked the merged PR and approval, and assigned it to |
Explanation of Change
Expose actionable Upload receipt controls as buttons, while keeping read-only thumbnails non-interactive. Labels, layout and upload handlers are unchanged.
Fixed Issues
$
PROPOSAL: N/A — C+ small fix approved during review.
Tests
Offline tests
QA Steps
Same as Tests and Offline tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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.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-receipt-actionable-role-oct21-complete.mp4
Android: mWeb Chrome
Android-mWeb-receipt-actionable-role-oct21.mp4
iOS: Native
ios-receipt-actionable-role-oct21.mp4
iOS: mWeb Safari
ios-mWeb-receipt-actionable-role-oct21.mp4
MacOS: Chrome / Safari
Chrome-receipt-actionable-role-oct21-final.mp4