fix: Screen Reader: Many Pages: There is no dialog role and title announced#82510
Conversation
|
@mkhutornyi 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] |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec12725d8f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…ents - Extract 'rhp-dialog-title' to CONST.RHP_DIALOG_TITLE_NATIVE_ID - Use stack-based label context to handle stacked RHP navigation - Use function-based initialFocus to target topmost screen's title - Remove unused nativeID/tabIndex from RHPDialogContainer - Trim obvious comments, fix import ordering in ScreenWrapper
…moving wrong label
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fda13f35db
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx
Outdated
Show resolved
Hide resolved
|
There's bad regression. flicker.mov |
…Reader-Many-Pages-There-is-no-dialog-role-and-title-announced
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f735334cd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2fd056f0ae
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…Reader-Many-Pages-There-is-no-dialog-role-and-title-announced
…Reader-Many-Pages-There-is-no-dialog-role-and-title-announced
amyevans
left a comment
There was a problem hiding this comment.
LGTM! Thanks for your work here!
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @amyevans 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/amyevans in version: 9.3.36-0 🚀
|
|
Deploy Blocker #84958 was identified to be related to this PR. |
|
Deploy Blocker ##84966 was identified to be related to this PR. |
|
Deploy Blocker #83706 was identified to be related to this PR. |
|
Deploy Blocker #85033 was identified to be related to this PR. |
|
Deploy Blocker #85045 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.36-10 🚀
|
Explanation of Change
Screen readers don't announce dialog role or title when opening RHP pages (WCAG 4.1.2 violation).
Root causes: RHP container has no
role="dialog",aria-modal, oraria-label, and focus never moves into the RHP content.Fix:
DialogLabelContext— New ID-based stack context (split into actions/value to avoid re-renders) that communicates theHeadertitle up to the RHP container. Stack-based so mounted background screens don't clobberthe active label.
RHPDialogContainer— WrapsStack.NavigatorinRightModalNavigator, conditionally appliesrole="dialog",aria-modal, andaria-labelwhen a label is available.Header— Registers its title viapushLabel/updateLabel/popLabelon mount/update/unmount.useDialogTitleFocus— Platform-specific hook (index.ts/index.native.ts). Web focuses the title ref after transition usinguseFocusEffect+ANIMATED_TRANSITIONdelay (same pattern asuseDelayedAutoFocus). Native is a no-op.Fixed Issues
$ #76944
PROPOSAL: #76944 (comment)
Tests
Setup: Use web (wide layout). Enable a screen reader (VoiceOver on macOS, or JAWS/NVDA on Windows).
Offline tests
Same as tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Mac-Chrome.mp4