Fix: Remove Duplicate Focusable Elements#83155
Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
| )} | ||
| {column.rows.map((row) => ( | ||
| <Hoverable key={row.translationPath}> | ||
| {(hovered) => |
There was a problem hiding this comment.
❌ CONSISTENCY-3 (docs)
The two branches of the ternary render nearly identical FooterRow components -- only the onPress vs href prop differs. Since FooterRow already handles the onPress/href branching internally (both the web and native implementations check if (onPress)), the caller can pass the whole row without splitting:
{column.rows.map((row) => (
<Hoverable key={row.translationPath}>
{(hovered) => (
<FooterRow
onPress={row.onPress}
href={row.href}
translationPath={row.translationPath}
text={translate(row.translationPath)}
style={getTextLinkStyle(hovered)}
/>
)}
</Hoverable>
))}This eliminates the duplicated JSX block.
Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
| style: StyleProp<TextStyle>; | ||
| }; | ||
|
|
||
| function FooterRow({href, onPress, text, style}: FooterRowProps) { |
There was a problem hiding this comment.
❌ CONSISTENCY-4 (docs)
The translationPath prop is included in FooterRowProps (via FooterColumnRow) but is never used in the web implementation of FooterRow. The caller in Footer.tsx passes translationPath={row.translationPath} to this component, but it is silently ignored.
Consider either:
- Using
translationPathfor something (e.g., as adata-testidorsentryLabelfor consistency with the native version), or - Omitting it from the props type for the web implementation if it is truly not needed here.
Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
trjExpensify
left a comment
There was a problem hiding this comment.
Accessibility project PR 👍
|
Will get to this one tomorrow. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp01_Android_Native.mp4Android: mWeb Chrome02_Android_Chrome.mp4iOS: HybridApp03_iOS_Native.mp4iOS: mWeb Safari04_iOS_Safari.mp4MacOS: Chrome / Safari05_MacOS_Chrome.mp4 |
|
This one requires a little more testing, will finish it off on monday. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @roryabraham 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/roryabraham in version: 9.3.28-0 🚀
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.3.30-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.30-3 🚀
|
Explanation of Change
Prevent duplicate TalkBack focus stops by making footer links render as a single accessible pressable on native (inner text is non‑accessible), while keeping web TextLink behavior intact.
Remove extra accessibility nodes from text inputs by hiding the floating label and marking the wrapper as non‑accessible, so only the actual input is announced once.
Fixed Issues
$ #79245
PROPOSAL: #79245 (comment)
Tests
Precondition:
The user is not signed in
Second issue
Precondition:
The user is not signed in
'Phone or email input field, edit box'
Offline tests
Same as Tests.
QA Steps
Same as Tests.
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
phone-email-android.mp4
footer-android.mp4
Android: mWeb Chrome
email-mweb.mp4
footer-mweb.mp4
iOS: Native
Screen.Recording.1404-11-09.at.2.07.47.PM.mov
Screen.Recording.1404-11-09.at.2.18.20.PM.mov
iOS: mWeb Safari
Screen.Recording.1404-11-09.at.2.11.15.PM.mov
Screen.Recording.1404-11-09.at.2.23.46.PM.mov
MacOS: Chrome / Safari
Screen.Recording.1404-11-09.at.3.01.19.PM.mp4
Screen.Recording.1404-11-09.at.3.02.02.PM.mov