Skip to content

feat: enhance a11y experience in room swipe actions#6985

Merged
OtavioStasiak merged 26 commits intodevelopfrom
feat.a11y-room-item-swipe-actions
Apr 27, 2026
Merged

feat: enhance a11y experience in room swipe actions#6985
OtavioStasiak merged 26 commits intodevelopfrom
feat.a11y-room-item-swipe-actions

Conversation

@OtavioStasiak
Copy link
Copy Markdown
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;
  • Focus on room Item;
  • Long press action;

Case 2:

  • Connect keyboard;
  • On RoomsListView focus on room Item;
  • Long press Enter button;

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 opens an action sheet with quick actions: mark read/unread, favorite/unfavorite, and hide. Action sheet respects screen reader and external keyboard presence.
  • Accessibility

    • Added accessibility hints to room items and improved swipe-action accessibility to better support assistive technologies.
  • Tests

    • Added a test mock for external keyboard detection.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 13, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds accessibility hints to RoomItem and disables accessibility for swipe action buttons; centralizes room action items via getRoomActionsOptions; changes long-press flow to query screen reader and external keyboard before showing an action sheet; adds native ExternalInput modules (Android/iOS) with a JS helper and Jest mock.

Changes

Cohort / File(s) Summary
RoomItem accessibility & swipe actions
app/containers/RoomItem/Actions.tsx, app/containers/RoomItem/Wrapper.tsx, app/containers/RoomItem/RoomItem.tsx, app/containers/RoomItem/interfaces.ts
Adds accessibilityHint prop to Wrapper/RoomItem and forwards it to the root View; marks swipe RectButton components accessible={false} and sets action wrapper Views accessibilityElementsHidden/importantForAccessibility='no'.
Long-press, action sheet & options
app/containers/RoomItem/index.tsx, app/containers/RoomItem/getRoomActionsOptions.ts
Converts long-press handler to async; queries AccessibilityInfo.isScreenReaderEnabled() and isExternalKeyboardConnected() and conditionally shows an action sheet using new getRoomActionsOptions(); adds IRoomActionsParams and getRoomActionsOptions.
Native ExternalInput modules (Android & iOS) & registration
android/app/.../input/ExternalInputModule.kt, android/app/.../input/ExternalInputPackage.kt, android/app/src/main/java/.../MainApplication.kt, ios/ExternalInputModule.h, ios/ExternalInputModule.m, ios/RocketChatRN.xcodeproj/project.pbxproj
Adds ExternalInput native module exposing synchronous isExternalKeyboardConnected() on iOS/Android, registers package in Android MainApplication, and adds module files/framework entries to Xcode project.
JS helper, tests & dependency
app/lib/methods/helpers/externalInput.ts, jest.setup.js, package.json
Adds isExternalKeyboardConnected() JS helper that reads NativeModules.ExternalInput (falls back to false), a Jest mock returning false, and adds dependency react-native-external-keyboard.
Touch/keyboard focus & touchables
app/containers/Touch.tsx, app/containers/RoomItem/Touchable.tsx
Touch now wraps button with withKeyboardFocus (ref type relaxed) and sets focus props; Touchable forwards onLongPress to underlying touch component.
Minor logic & i18n
app/views/RoomView/List/hooks/useScroll.ts, app/i18n/locales/en.json
Fixes findIndex fallback in jumpToMessage (use `

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant RoomItem as RoomItemContainer
    participant Accessibility as AccessibilityInfo
    participant External as ExternalInput (Native)
    participant Options as getRoomActionsOptions
    participant ActionSheet
    participant Handlers as ActionHandlers

    User->>RoomItem: Long press
    RoomItem->>Accessibility: isScreenReaderEnabled()
    Accessibility-->>RoomItem: screenReaderStatus
    RoomItem->>External: isExternalKeyboardConnected()
    External-->>RoomItem: externalKeyboardStatus
    alt screenReaderStatus == true OR externalKeyboardStatus == true
        RoomItem->>Options: getRoomActionsOptions(rid,type,isRead,favorite,serverVersion)
        Options-->>RoomItem: options[]
        RoomItem->>ActionSheet: showActionSheet(options)
        ActionSheet-->>User: display options
        User->>ActionSheet: select option
        ActionSheet->>Handlers: execute selected (toggleRead/toggleFav/hideRoom)
        Handlers-->>User: action applied
    else
        RoomItem->>User: invoke custom onLongPress or noop
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'feat: enhance a11y experience in room swipe actions' directly and specifically describes the main objective of the changeset: improving accessibility for room swipe actions.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • MA-264: Request failed with status code 401

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
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
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 had a problem deploying to upload_experimental_android February 13, 2026 20:35 — with GitHub Actions Failure
@github-actions
Copy link
Copy Markdown

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
Copy Markdown

iOS Build Available

Rocket.Chat Experimental 4.70.0.108279

@OtavioStasiak OtavioStasiak temporarily deployed to approve_e2e_testing April 7, 2026 00:32 — with GitHub Actions Inactive
@OtavioStasiak OtavioStasiak temporarily deployed to experimental_ios_build April 7, 2026 00:35 — with GitHub Actions Inactive
@OtavioStasiak OtavioStasiak had a problem deploying to official_android_build April 7, 2026 00:35 — with GitHub Actions Error
@Rohit3523
Copy link
Copy Markdown
Member

LGTM

@OtavioStasiak OtavioStasiak requested a deployment to official_android_build April 27, 2026 22:00 — with GitHub Actions Waiting
@OtavioStasiak OtavioStasiak requested a deployment to experimental_android_build April 27, 2026 22:00 — with GitHub Actions Waiting
@OtavioStasiak OtavioStasiak requested a deployment to experimental_ios_build April 27, 2026 22:00 — with GitHub Actions Waiting
@OtavioStasiak OtavioStasiak merged commit 2c4dd8d into develop Apr 27, 2026
5 of 11 checks passed
@OtavioStasiak OtavioStasiak deleted the feat.a11y-room-item-swipe-actions branch April 27, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants