Skip to content

a11y: Make isTalkbackActive() live. #4903

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

Merged
merged 1 commit into from
Jun 20, 2025
Merged

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Jun 20, 2025

Content

We made the assumption that the user needs to navigate to the setting to enable or disable the talkback, but there is a way to add a talkback switch on the bottom navigation bar. So the talkback can be enabled/disabled when the application is resumed. Since the UI may render differently depending on the talkback state, we need to make the composable isTalkbackActive() backed on a mutable state.

Motivation and context

Ensure the UI is responsive regarading the talkback state.

Screenshots / GIFs

LiveAccessibilityState.mp4

Tests

  • From the talkback (screen reader) setting, enable the shortcut. On my device, this is like this:
image - open EXA - open a timeline - toggle the accessibility shortcut - observe that the timeline is now getting reverse when the screen reader is enabled.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • 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 define 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

We made the assumption that the user needs to navigate to the setting to enable or disable the talkback, but there is a way to add a talkback switch on the bottom navigation bar. So the talkback can be enabled/disabled when the application is resumed. Since the UI may render differently depending on the talkback state, we need to make the composable `isTalkbackActive()` backed on a mutable state.
@bmarty bmarty requested a review from a team as a code owner June 20, 2025 07:47
@bmarty bmarty added the PR-Misc For other changes label Jun 20, 2025
@bmarty bmarty requested review from ganfra and removed request for a team June 20, 2025 07:47
Copy link
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/iwBmDY

Copy link

Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

Good catch!

Copy link

codecov bot commented Jun 20, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.30%. Comparing base (3a2e36b) to head (ba3e64c).
Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
...droid/libraries/ui/utils/time/IsTalkbackEnabled.kt 87.50% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4903   +/-   ##
========================================
  Coverage    80.30%   80.30%           
========================================
  Files         2155     2155           
  Lines        57305    57312    +7     
  Branches      7220     7220           
========================================
+ Hits         46020    46026    +6     
- Misses        8836     8837    +1     
  Partials      2449     2449           

☔ View full report in Codecov by Sentry.
📢 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.

@bmarty bmarty merged commit fadd2f9 into develop Jun 20, 2025
35 of 36 checks passed
@bmarty bmarty deleted the feature/bma/liveIsTalkBackActive branch June 20, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Misc For other changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants