Skip to content

Expose the timeline item long press and swipe to reply as TalkBack actions - #7458

Merged
jmartinesp merged 5 commits into
element-hq:developfrom
hayaksi1:fix/4600-timeline-talkback-actions
Sep 2, 2026
Merged

Expose the timeline item long press and swipe to reply as TalkBack actions#7458
jmartinesp merged 5 commits into
element-hq:developfrom
hayaksi1:fix/4600-timeline-talkback-actions

Conversation

@hayaksi1

Copy link
Copy Markdown
Contributor

Content

A timeline item carries two gesture-only actions: long press opens the message action list, and a horizontal swipe starts a reply. Neither is reachable with TalkBack enabled, so a screen reader user cannot reach the action list at all — this is what the issue reports.

Publish both as accessibility custom actions on the event row, reusing the existing "Message actions" and "Reply" strings so no new translations are needed. The reply action is only offered when the user is allowed to reply, matching the condition that enables the swipe.

The scope is deliberately limited to restoring actions that already exist for sighted users. The larger list discussed on the issue — react, edit, share, links, view profile — is a product decision about which actions deserve to be surfaced directly rather than through the action list, so it is left out.

Motivation and context

Part of #4600.

Tests

No new automated test: the module's timeline view tests assert on rendered content, and Robolectric does not run the accessibility delegate that turns customActions into TalkBack actions, so a test here would only re-assert the semantics property I just set.

Manual check: with TalkBack on, focus a message and open the local context menu — "Message actions" and "Reply" are listed, and each performs the same action as the gesture.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • I am aware of the etiquette.
  • This PR was made with the help of AI:
    • Yes. In this case, please request a review by Copilot.
    • No.
  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly defines what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

Long pressing a timeline item opens the action list, and swiping it
starts a reply. Neither gesture is reachable with a screen reader
enabled, so those two actions were unavailable to TalkBack users.

Publish them as accessibility custom actions on the event row, reusing
the existing "Message actions" and "Reply" strings. The reply action is
only offered when the user is allowed to reply, matching the swipe.
@hayaksi1
hayaksi1 requested a review from a team as a code owner August 17, 2026 08:40
@hayaksi1
hayaksi1 requested review from jmartinesp and removed request for a team August 17, 2026 08:40
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Here are a few things to check in the PR to ensure it's reviewed as quickly as possible:

  • If your pull request adds a feature or modifies the UI, this should have an equivalent pull request in the Element X iOS repo unless it only affects an Android-only behaviour or is behind a disabled feature flag, since we need parity in both clients to consider a feature done. It will also need to be approved by our product and design teams before being merged, so it's usually a good idea to discuss the changes in a Github issue first and then start working on them once the approach has been validated.
  • Your branch should be based on origin/develop, at least when it was created.
  • The title of the PR will be used for release notes, so it needs to describe the change visible to the user.
  • The test pass locally running ./gradlew test.
  • The code quality check suite pass locally running ./gradlew runQualityChecks.
  • If you modified anything related to the UI, including previews, you'll have to run the Record screenshots GH action in your forked repo: that will generate compatible new screenshots. However, given Github Actions limitations, it will prevent the CI from running temporarily, until you upload a new commit after that one. To do so, just pull the latest changes and push an empty commit.

@github-actions github-actions Bot added the Z-Community-PR Issue is solved by a community member's PR label Aug 17, 2026

@jmartinesp jmartinesp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is quite handy.

@bmarty

bmarty commented Aug 21, 2026

Copy link
Copy Markdown
Member

@hayaksi1 can you record the screenshots please? We have screenshot with a11y details.

@CLAassistant

CLAassistant commented Aug 21, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ hayaksi1
❌ ElementBot
You have signed the CLA already but the status is still pending? Let us recheck it.

@hayaksi1
hayaksi1 force-pushed the fix/4600-timeline-talkback-actions branch from cd7e1a0 to fc2db01 Compare August 21, 2026 15:32
@hayaksi1

Copy link
Copy Markdown
Contributor Author

Done!

@bmarty

bmarty commented Aug 24, 2026

Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

…e-talkback-actions

# Conflicts:
#	tests/uitests/src/test/snapshots/images/features.messages.impl_MessagesViewA11y_en.png
@hayaksi1

hayaksi1 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@bmarty Done.

@bmarty

bmarty commented Aug 27, 2026

Copy link
Copy Markdown
Member

@bmarty Done.

I do not see updated screenshot in the PR. I'll trigger the workflows again.

@hayaksi1

Copy link
Copy Markdown
Contributor Author

@bmarty Done.

@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.83%. Comparing base (6ab3d73) to head (a140b63).
⚠️ Report is 220 commits behind head on develop.

Files with missing lines Patch % Lines
...s/impl/timeline/components/TimelineItemEventRow.kt 80.00% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7458      +/-   ##
===========================================
- Coverage    80.86%   80.83%   -0.03%     
===========================================
  Files         2771     2771              
  Lines        81398    81421      +23     
  Branches     11168    11170       +2     
===========================================
- Hits         65822    65819       -3     
- Misses       11273    11300      +27     
+ Partials      4303     4302       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jmartinesp
jmartinesp merged commit d2f540a into element-hq:develop Sep 2, 2026
25 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants