-
Notifications
You must be signed in to change notification settings - Fork 13k
fix: Add screen reader support to Message search for announcing number of search result matches. #37247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…number of matching results in message search immediately after the search has been performed.
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: 6c2a8a5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 42 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Caution Review failedThe pull request is closed. WalkthroughAdded screen-reader announcements and live-region semantics to the message search UI; introduced a pluralized translation key for localized search result counts; corrected several typos in English translations. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User as User (search)
participant UI as MessageSearch Component
participant SR as Screen Reader
User->>UI: Submit search query
UI->>UI: Compute results (data)
alt results.length == 0
UI->>SR: update aria-live region (assertive) with "0 results" (aria-label)
Note right of UI: Empty-state boxed in section with aria-live
else results.length > 0
UI->>SR: render VisuallyHidden announcer with localized count
UI->>UI: render MessageList (visible)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
⛔ Files ignored due to path filters (5)
📒 Files selected for processing (57)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/i18n/src/locales/en.i18n.json (1)
4649-4650: Polish the singular translation stringWhen
count === 1, this renders as “Found 1 single result”, which is awkward. Either drop the interpolated{{count}}(“Found a single result”) or change the wording so the numeral isn’t redundant.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
apps/meteor/client/views/room/contextualBar/MessageSearchTab/components/MessageSearch.tsx(2 hunks)packages/i18n/src/locales/en.i18n.json(1 hunks)
apps/meteor/client/views/room/contextualBar/MessageSearchTab/components/MessageSearch.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Douglas Fabris <[email protected]>
Co-authored-by: Douglas Fabris <[email protected]>
fix: Add screen reader support for Search messages
Proposed changes
This PR improves accessibility/WCAG compability - improvement to the user experience when using the Search Messages functionality together with Screen reader software.
When a user performs a search in the Search Messages (
MessageSearchcomponent) interface, this fix introduces support for screen readers to announce the number of results found. If no matching results are found, then the user is informed that no results have been found.The result feedback is to be announced immediately upon a search and should not force the user to navigate to the result list.
Issue(s)
Steps to test or reproduce
Further comments
Development and testing:
When the number of results are greater then zero, include a
VisuallyHiddenblock to make the results available to screen reader. There may be other and better approaches than this.Summary by CodeRabbit
New Features
Bug Fixes