Skip to content

Conversation

@antm-rp
Copy link

@antm-rp antm-rp commented Oct 16, 2025

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 (MessageSearch component) 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

  • Use Rocket.Chat together with a screen reader
  • Navigate to Search Messages
  • Enter n search terms
  • Verify that the screen reader announce the number of found matches
  • Verify distinction between singular and multiple results (see en.i18n.json)

Further comments

Development and testing:

  • Functionality have been successfully tested with Chromium on Linux together with the Orca screen reader.
  • Functionality does not seem to read the results when testing the solution in Firefox with Orca screen reader.

When the number of results are greater then zero, include a VisuallyHidden block to make the results available to screen reader. There may be other and better approaches than this.

Summary by CodeRabbit

  • New Features

    • Accessibility announcements for message search results and localized plural counts.
    • Optional expandable message composer (feature-flagged) for a larger compose area.
    • ABAC attributes displayed on user info pages.
    • Improved real-time charts initialization and explicit chart reset for more reliable dashboards.
    • Pagination support added to several admin tables.
  • Bug Fixes

    • Corrected multiple translation typos and clarified related copy.

…number of matching results in message search immediately after the search has been performed.
@antm-rp antm-rp requested a review from a team as a code owner October 16, 2025 09:54
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Oct 16, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Oct 16, 2025

🦋 Changeset detected

Latest commit: 6c2a8a5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 42 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/federation-service Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 16, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Added 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

Cohort / File(s) Summary
Message search accessibility
apps/meteor/client/views/room/contextualBar/MessageSearchTab/components/MessageSearch.tsx
Imported VisuallyHidden from react-aria. Empty-results now wrapped in a section Box with aria-live="assertive" and an aria-label describing the zero-result state. Non-empty results render an additional VisuallyHidden status announcer containing the localized message count while preserving existing MessageList rendering.
Internationalization & fixes
packages/i18n/src/locales/en.i18n.json
Added pluralized key Search_Messages_Count with one/other forms. Fixed multiple English typos and adjusted several existing translation values (e.g., OTP wording, "accommodate", "successfully", downgrade message, "push notifications").

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Poem

🐰
I hopped through searches, soft and spry,
Counting results the screen can't spy.
Whether none or many, I quietly cheer,
Whispering totals only the reader can hear. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly and concisely summarizes the primary change by indicating that screen reader support is being added to the Message search feature to announce search result counts, mirroring the accessibility enhancements implemented in the code and matching the PR objectives. It is specific enough for a teammate to understand the main impact and avoids unnecessary detail about implementation. The wording follows conventional commit style while remaining readable and directly tied to the change.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

📜 Recent 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 9f5efcc and 6c2a8a5.

⛔ Files ignored due to path filters (5)
  • apps/meteor/client/components/UserInfo/__snapshots__/UserInfo.spec.tsx.snap is excluded by !**/*.snap
  • apps/meteor/client/views/admin/permissions/PermissionsTable/__snapshots__/PermissionsTable.spec.tsx.snap is excluded by !**/*.snap
  • apps/meteor/client/views/admin/permissions/UsersInRole/UsersInRoleTable/__snapshots__/UsersInRoleTable.spec.tsx.snap is excluded by !**/*.snap
  • apps/meteor/public/images/featurePreview/expandable-composer.png is excluded by !**/*.png
  • packages/ui-composer/src/MessageComposer/__snapshots__/MessageComposer.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (57)
  • .changeset/chilled-chicken-drop.md (1 hunks)
  • .changeset/clever-cycles-sing.md (1 hunks)
  • .changeset/lemon-kings-approve.md (1 hunks)
  • .changeset/rare-schools-laugh.md (1 hunks)
  • .changeset/slow-tomatoes-try.md (1 hunks)
  • apps/meteor/app/autotranslate/client/lib/autotranslate.ts (0 hunks)
  • apps/meteor/app/livechat/client/lib/chartHandler.ts (1 hunks)
  • apps/meteor/app/livechat/server/methods/sendFileLivechatMessage.ts (2 hunks)
  • apps/meteor/app/livechat/server/methods/setUpConnection.ts (2 hunks)
  • apps/meteor/client/components/GenericTable/hooks/usePagination.ts (1 hunks)
  • apps/meteor/client/components/UserInfo/UserInfo.spec.tsx (1 hunks)
  • apps/meteor/client/components/UserInfo/UserInfo.stories.tsx (1 hunks)
  • apps/meteor/client/components/UserInfo/UserInfo.tsx (5 hunks)
  • apps/meteor/client/components/UserInfo/UserInfoABACAttribute.tsx (1 hunks)
  • apps/meteor/client/components/UserInfo/UserInfoABACAttributes.tsx (1 hunks)
  • apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardCardFilter.tsx (1 hunks)
  • apps/meteor/client/views/admin/import/NewImportPage.tsx (5 hunks)
  • apps/meteor/client/views/admin/permissions/PermissionsPage.tsx (2 hunks)
  • apps/meteor/client/views/admin/permissions/PermissionsTable/PermissionsTable.spec.tsx (4 hunks)
  • apps/meteor/client/views/admin/permissions/PermissionsTable/PermissionsTable.stories.tsx (2 hunks)
  • apps/meteor/client/views/admin/permissions/PermissionsTable/PermissionsTable.tsx (2 hunks)
  • apps/meteor/client/views/admin/permissions/UsersInRole/UsersInRolePage.tsx (4 hunks)
  • apps/meteor/client/views/admin/permissions/UsersInRole/UsersInRoleTable/UsersInRoleTable.spec.tsx (1 hunks)
  • apps/meteor/client/views/admin/permissions/UsersInRole/UsersInRoleTable/UsersInRoleTable.stories.tsx (1 hunks)
  • apps/meteor/client/views/admin/permissions/UsersInRole/UsersInRoleTable/UsersInRoleTable.tsx (4 hunks)
  • apps/meteor/client/views/admin/permissions/UsersInRole/UsersInRoleTable/UsersInRoleTableRow.tsx (2 hunks)
  • apps/meteor/client/views/admin/permissions/UsersInRole/hooks/useRemoveUserFromRole.tsx (1 hunks)
  • apps/meteor/client/views/admin/settings/Setting/SettingSkeleton.tsx (2 hunks)
  • apps/meteor/client/views/admin/users/UsersTable/UsersTable.stories.tsx (2 hunks)
  • apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/AgentStatusChart.tsx (2 hunks)
  • apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/ChatDurationChart.tsx (3 hunks)
  • apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/ChatsChart.tsx (2 hunks)
  • apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/ChatsPerAgentChart.tsx (2 hunks)
  • apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/ChatsPerDepartmentChart.tsx (2 hunks)
  • apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/ResponseTimesChart.tsx (2 hunks)
  • apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/useChartContext.tsx (1 hunks)
  • apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/useUpdateChartData.ts (2 hunks)
  • apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx (3 hunks)
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteLink.tsx (2 hunks)
  • apps/meteor/client/views/room/contextualBar/UserInfo/UserInfoWithData.tsx (1 hunks)
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfList/VideoConfListItem.tsx (3 hunks)
  • apps/meteor/tests/mocks/data.ts (1 hunks)
  • ee/apps/ddp-streamer/src/configureServer.ts (1 hunks)
  • ee/packages/media-calls/src/internal/SignalProcessor.ts (6 hunks)
  • ee/packages/media-calls/src/internal/agents/UserActorAgent.ts (3 hunks)
  • ee/packages/media-calls/src/server/getNewCallTransferredBy.ts (1 hunks)
  • packages/i18n/src/locales/en.i18n.json (8 hunks)
  • packages/media-signaling/src/definition/call/IClientMediaCall.ts (1 hunks)
  • packages/media-signaling/src/definition/signals/server/new.ts (1 hunks)
  • packages/media-signaling/src/lib/Call.ts (3 hunks)
  • packages/ui-client/src/hooks/useFeaturePreviewList.ts (2 hunks)
  • packages/ui-composer/src/MessageComposer/MessageComposer.stories.tsx (2 hunks)
  • packages/ui-composer/src/MessageComposer/MessageComposerInputExpandable.spec.tsx (1 hunks)
  • packages/ui-composer/src/MessageComposer/MessageComposerInputExpandable.tsx (1 hunks)
  • packages/ui-composer/src/MessageComposer/index.ts (2 hunks)
  • packages/ui-voip/src/v2/useMediaSessionInstance.ts (1 hunks)
  • packages/web-ui-registration/src/template/FormSkeleton.tsx (2 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 string

When 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.

📥 Commits

Reviewing files that changed from the base of the PR and between a62792a and c91cdb8.

📒 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)

@antm-rp antm-rp requested a review from a team as a code owner October 16, 2025 10:25
@antm-rp antm-rp closed this Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants