Skip to content

feat: enhance a11y experience in room swipe actions#6985

Draft
OtavioStasiak wants to merge 3 commits intodevelopfrom
feat.a11y-room-item-swipe-actions
Draft

feat: enhance a11y experience in room swipe actions#6985
OtavioStasiak wants to merge 3 commits intodevelopfrom
feat.a11y-room-item-swipe-actions

Conversation

@OtavioStasiak
Copy link
Contributor

@OtavioStasiak OtavioStasiak commented Feb 13, 2026

Proposed changes

Issue(s)

https://rocketchat.atlassian.net/browse/MA-264

How to test or reproduce

  • Open the app;
  • On RoomsListView turn screen reader on;

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Summary by CodeRabbit

  • New Features

    • Long-press on room items to access quick actions for marking as read/unread, favoriting, or hiding.
  • Accessibility

    • Improved accessibility hints and screen reader support for enhanced assistive technology integration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 13, 2026

Walkthrough

The PR enhances accessibility for the RoomItem component by disabling accessibility on action buttons, adding accessibility hints for long-press interactions, introducing a new module to generate action sheet options, and integrating long-press functionality with screen reader detection to display contextual room actions.

Changes

Cohort / File(s) Summary
Accessibility Attributes
app/containers/RoomItem/Actions.tsx, app/containers/RoomItem/interfaces.ts
Disables accessibility on RectButton action buttons and adds optional accessibilityHint property to IWrapperProps interface.
Accessibility Hint Propagation
app/containers/RoomItem/RoomItem.tsx, app/containers/RoomItem/Wrapper.tsx
Passes accessibilityHint prop through RoomItem to Wrapper component and forwards it to underlying View element.
Action Sheet Module
app/containers/RoomItem/getRoomActionsOptions.ts
Creates new public module exporting IRoomActionsParams interface and getRoomActionsOptions() function that generates action sheet items for mark read/unread, favorite/unfavorite, and hide room actions.
Long-Press Integration
app/containers/RoomItem/index.tsx
Integrates long-press handling with screen reader detection; shows action sheet with generated options when long-pressed if screen reader is enabled and no custom handler exists.
Internationalization
app/i18n/locales/en.json
Adds new i18n entry "Long_press_for_more_actions" for accessibility hint text.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant RoomItemContainer
    participant AccessibilityInfo
    participant ActionSheet
    participant ActionHandlers

    User->>RoomItemContainer: Long press
    RoomItemContainer->>AccessibilityInfo: isScreenReaderEnabled()
    AccessibilityInfo-->>RoomItemContainer: status
    alt Screen Reader Enabled
        RoomItemContainer->>RoomItemContainer: getRoomActionsOptions()
        RoomItemContainer->>ActionSheet: showActionSheet(options)
        ActionSheet-->>User: Display actions
        User->>ActionSheet: Select action
        ActionSheet->>ActionHandlers: Execute (toggleRead/toggleFav/hideRoom)
        ActionHandlers-->>User: Action completed
    else Screen Reader Disabled
        RoomItemContainer->>User: Default behavior or custom handler
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A press so long, accessibility takes flight,
Action sheets bloom for screen readers bright,
With hints and hints and hints galore,
The room item's voice rings clear and sure! ✨

🚥 Pre-merge checks | ✅ 5 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The linked issue MA-264 provides insufficient detail about specific coding requirements to validate whether the PR fully meets its objectives. Provide detailed acceptance criteria or requirements in the linked issue to enable proper validation of the implementation against specifications.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: enhance a11y experience in room swipe actions' clearly and concisely summarizes the main change: improving accessibility in room swipe actions.
Out of Scope Changes check ✅ Passed All changes are directly related to enhancing accessibility in room item interactions, including action containers, long-press behavior, and localization strings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into develop

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


No actionable comments were generated in the recent review. 🎉

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0b93f25 and 244c05c.

⛔ Files ignored due to path filters (1)
  • app/containers/RoomItem/__snapshots__/RoomItem.test.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (7)
  • app/containers/RoomItem/Actions.tsx
  • app/containers/RoomItem/RoomItem.tsx
  • app/containers/RoomItem/Wrapper.tsx
  • app/containers/RoomItem/getRoomActionsOptions.ts
  • app/containers/RoomItem/index.tsx
  • app/containers/RoomItem/interfaces.ts
  • app/i18n/locales/en.json
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: OtavioStasiak
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6499
File: app/containers/ServerItem/index.tsx:34-36
Timestamp: 2025-12-17T15:56:22.578Z
Learning: In the Rocket.Chat React Native codebase, for radio button components on iOS, include the selection state ("Selected"/"Unselected") in the accessibilityLabel instead of using accessibilityState={{ checked: hasCheck }}, because iOS VoiceOver has known issues with accessibilityRole="radio" + accessibilityState that prevent correct state announcement.
📚 Learning: 2025-12-17T15:56:22.578Z
Learnt from: OtavioStasiak
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6499
File: app/containers/ServerItem/index.tsx:34-36
Timestamp: 2025-12-17T15:56:22.578Z
Learning: In the Rocket.Chat React Native codebase, for radio button components on iOS, include the selection state ("Selected"/"Unselected") in the accessibilityLabel instead of using accessibilityState={{ checked: hasCheck }}, because iOS VoiceOver has known issues with accessibilityRole="radio" + accessibilityState that prevent correct state announcement.

Applied to files:

  • app/containers/RoomItem/index.tsx
  • app/containers/RoomItem/Actions.tsx
  • app/containers/RoomItem/RoomItem.tsx
  • app/containers/RoomItem/Wrapper.tsx
🧬 Code graph analysis (3)
app/containers/RoomItem/getRoomActionsOptions.ts (4)
app/containers/ActionSheet/Provider.tsx (1)
  • TActionSheetOptionsItem (8-20)
app/lib/methods/helpers/helpers.ts (1)
  • isRead (82-86)
app/lib/methods/toggleRead.ts (1)
  • toggleRead (6-33)
app/lib/methods/toggleFav.ts (1)
  • toggleFav (5-26)
app/containers/RoomItem/index.tsx (3)
app/containers/ActionSheet/Provider.tsx (1)
  • useActionSheet (44-44)
app/lib/hooks/useAppSelector.ts (1)
  • useAppSelector (6-6)
app/containers/RoomItem/getRoomActionsOptions.ts (1)
  • getRoomActionsOptions (16-41)
app/containers/RoomItem/Wrapper.tsx (1)
app/containers/RoomItem/interfaces.ts (1)
  • IWrapperProps (42-58)
🔇 Additional comments (6)
app/containers/RoomItem/interfaces.ts (1)

44-44: LGTM!

Clean addition of the optional accessibilityHint prop to IWrapperProps.

app/i18n/locales/en.json (1)

474-474: LGTM!

New localization key is clear and descriptive.

app/containers/RoomItem/getRoomActionsOptions.ts (1)

1-41: Clean module with well-structured action options.

The implementation is straightforward. The action items correctly toggle state labels, icons, and test IDs based on current room state.

app/containers/RoomItem/index.tsx (1)

64-82: Well-implemented accessibility-aware long-press handler.

The logic correctly gates the action sheet behind isScreenReaderEnabled, providing an accessible alternative to swipe gestures only when needed. The early return for item.separator is a good guard.

app/containers/RoomItem/RoomItem.tsx (1)

96-96: LGTM!

The accessibilityHint is correctly wired to the i18n key, and since hints are only announced by assistive technologies, this naturally aligns with the screen-reader-only action sheet behavior.

app/containers/RoomItem/Actions.tsx (1)

38-42: Good cross-platform accessibility hiding.

Using both accessibilityElementsHidden (iOS) and importantForAccessibility='no' (Android) on the action containers, combined with accessible={false} on the buttons, correctly hides swipe actions from assistive technologies on both platforms. This complements the new action sheet alternative nicely.

Also applies to: 127-131

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

@OtavioStasiak OtavioStasiak requested a deployment to official_android_build February 13, 2026 19:56 — with GitHub Actions Waiting
@OtavioStasiak OtavioStasiak deployed to experimental_android_build February 13, 2026 19:56 — with GitHub Actions Active
@OtavioStasiak OtavioStasiak deployed to experimental_ios_build February 13, 2026 19:56 — with GitHub Actions Active
@OtavioStasiak
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 13, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@OtavioStasiak OtavioStasiak requested a deployment to upload_experimental_android February 13, 2026 20:35 — with GitHub Actions Waiting
@github-actions
Copy link

Android Build Available

Rocket.Chat Experimental 4.70.0.108278

Internal App Sharing: https://play.google.com/apps/test/RQVpXLytHNc/ahAO29uNRoi4l1ziJFBJAWjXU9e9brk_cIMPE4-4LeplWjsirTk5pbtlhxJLmdJoBCT3KMB92TvLMEcycq39EimBPf

@github-actions
Copy link

iOS Build Available

Rocket.Chat Experimental 4.70.0.108279

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.

1 participant