Skip to content

Expose avatar controls as buttons to screen readers - #8318

Open
RanjithRagavan wants to merge 1 commit into
element-hq:developfrom
RanjithRagavan:fix/avatar-accessibility-roles
Open

RanjithRagavan wants to merge 1 commit into
element-hq:developfrom
RanjithRagavan:fix/avatar-accessibility-roles

Conversation

@RanjithRagavan

@RanjithRagavan RanjithRagavan commented Dec 2, 2026 •

Copy link
Copy Markdown

Content

Expose the avatar picker and avatar action-sheet items as buttons to accessibility services.

Add Compose tests for the empty and selected avatar states, the action-sheet roles, and click handling.

Motivation and context

Fixes #8292.

The picker's custom semantics replaced its button role, and the action-sheet rows were clickable without a role. Screen readers therefore did not announce these controls as buttons.

Screenshots / GIFs

No visual changes. The existing day/night previews pass Paparazzi verification.

Tests

  • Added regression tests; the three role assertions fail without the production changes and pass with them.
  • ./gradlew :libraries:matrixui:testDebugUnitTest :features:createroom:impl:testDebugUnitTest :libraries:matrixui:ktlintCheck :libraries:matrixui:detektFull — 105 tests passed, along with ktlint and detekt.
  • ./gradlew test --continue
  • ./gradlew runQualityChecks --continue
  • ./gradlew verifyPaparazziDebug
  • ./gradlew :app:assembleGplayDebug
  • Installed and launched the debug APK on a Pixel 7 Pro emulator running Android 13 (API 33). I could not exercise the New room flow with TalkBack because no signed-in test account was available.

Tested devices

  • Physical
  • Emulator
  • OS version(s): Android 13 (API 33)

Checklist

  • I am aware of the etiquette.
  • This PR was made with the help of AI:
    • Yes. In this case, please get the PR reviewed by an AI (e.g. a GitHub AI reviewer, or /code-review run in a fresh session) before requesting a human review.
    • 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

@RanjithRagavan
RanjithRagavan requested a review from a team as a code owner December 2, 2026 05:22
@RanjithRagavan
RanjithRagavan requested review from bmarty and removed request for a team December 2, 2026 05:22
@CLAassistant

CLAassistant commented Dec 2, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

github-actions Bot commented Dec 2, 2026

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 must be based on a feature request already discussed in
    element-meta, and previously discussed with and agreed on with our product and design teams
    (with the X-Accepting-PRs or X-Accepting-PoC-PRs label), otherwise it will be closed until it's been discussed with our product and
    design teams. Also, any Android pull request adding or modifying a feature should have an equivalent one 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.
  • 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 tests 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 record new screenshot tests with
    ./gradlew recordPaparazziDebug and include them as part of the PR.

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

Copy link
Copy Markdown
Author

Hi, I don’t have permission to add labels to this repository. Could someone add PR-Bugfix when reviewing? The PR Checks failure is only for the missing label. Thanks!

@RanjithRagavan

Copy link
Copy Markdown
Author

/code-review

@bmarty bmarty added the PR-Bugfix For bug fix label Dec 2, 2026
@bmarty

bmarty commented Dec 2, 2026

Copy link
Copy Markdown
Member

Thanks for the PR. I will propose an alternative PR that fix all the similar ListItem in our app.
Keeping your PR opened for the other change.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Bugfix For bug fix 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.

A11y-2: [New room] Object information. Role, state and value informat...

3 participants