Fix: "No results" status message not announced by screen readers#83126
Fix: "No results" status message not announced by screen readers#83126marufsharifi wants to merge 7 commits intoExpensify:mainfrom
Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
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.
|
|
@marufsharifi is this ready for review? |
|
|
||
| useEffect(() => { | ||
| if (Platform.OS !== 'web') { | ||
| return; |
There was a problem hiding this comment.
❌ CONSISTENCY-1 (docs)
StatusAccessibilityAnnouncer uses Platform.OS !== 'web' checks in both its useEffect (line 18) and its render return (line 62) to gate all behavior to web only. The codebase already has an established pattern for this: platform-specific file extensions. For example, useFormHelpMessageAccessibilityAnnouncement uses .ios.ts for iOS-specific logic and .ts as a no-op default.
Split StatusAccessibilityAnnouncer into platform-specific files:
StatusAccessibilityAnnouncer.tsx(orindex.web.tsx) with the web implementationStatusAccessibilityAnnouncer.native.tsx(orindex.native.tsx) returningnull
This eliminates the Platform.OS checks entirely and follows the project convention.
Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
| message: string; | ||
| announcementKey: string; | ||
| style: React.ComponentProps<typeof Text>['style']; | ||
| }; |
There was a problem hiding this comment.
❌ CONSISTENCY-3 (docs)
The NoResultsStatusMessage component duplicates the same pattern used in SearchBar.tsx (lines 52-58), SelectionList/components/TextInput.tsx (lines 145-152), and BaseSelectionListWithSections.tsx (lines 1031-1037): a <Text> element with accessibilityLiveRegion="polite" and role="status" combined with a useStatusAccessibilityAnnouncement hook call. This pattern is repeated across four components.
Consider extracting a single shared NoResultsStatusMessage (or AccessibleStatusText) component that encapsulates both the hook call and the ARIA live region Text. This would consolidate the duplicated pattern into one reusable component used across all four integration points.
Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e99424a15b
ℹ️ 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".
|
LGTM 👍 There seems to be a tiny delay on iOS native, but no big deal |
|
@suneox all yours |
|
@marufsharifi There's a conflict & almost rule ❌ CONSISTENCY is make sense we need to apply & if any rule doesn't apply please provide comment feedback on these rules |
|
@suneox, could you please take a look at the conflicts, since I don't have access to those files. thanks. |
Since you have commit src include
|
|
@suneox, I've addressed all your comments. Please take another look. thanks. |
|
@suneox, kindly bump. thanks. |
There was a problem hiding this comment.
This change shouldn't include in the PR, if can not resolve we need to create new PR after finish #83801
|
@marufsharifi gentle bump ^^ |
|
hey, im closing this and reassigning because it's at risk of not being implemented in the deadline i noticed a lot of anti patterns in this PR - eg: use of platform in files. so it is gonna take time to fix all that |

Explanation of Change
Before, when a search returned nothing, “No results found” appeared visually but was often silent to assistive tech. Now, that message is exposed as a polite status update on the web, so screen readers announce it when it appears.
Fixed Issues
$ #76958
PROPOSAL: #76958 (comment)
Tests
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
Screen.Recording.2026-02-28.at.9.49.16.AM.mov
Android: mWeb Chrome
Screen.Recording.2026-02-25.at.2.40.03.PM.mov
iOS: Native
Screen.Recording.2026-02-28.at.10.00.50.AM.mov
iOS: mWeb Safari
Screen.Recording.2026-03-02.at.9.36.54.AM.mov
MacOS: Chrome / Safari
Screen.Recording.2026-03-01.at.2.22.26.PM.mov