element-hq / element-hq/element-x-android
Reconsider accessibility navigation on the messages timeline
- Dominant language
- Kotlin
- Stars
- 2.4k
- Forks
- 624
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 149
Description
### Your use case
#### What would you like to do?
It would be nice to leverage existing Jetpack compose features to improve the accessibility presentation and navigation experience of the timeline beyond what toolkit gives us for free as per the default.
From an users perspective it would be nice to minimize number of navigation steps that have to be performed in order to move from one to the other item on the messages timeline.
#### Why would you like to do it?
It's natural pattern when dealing with huge or infinity lists on android. Other popular apps such as Gmail app, FairEmail app, Tusky have adopted this design pattern and screen reader users like the experience.
More over Jetpack compose also encourages this principle.
#### How would you like to achieve it?
Jetpack compose encourages accessibility support from the start.
And this would be great opportunity to reconsider accessibility support of the timeline view.
Jetpack compose has a nice feature where it automatically merges non clickable children so users relying on accessibility services such as talkback don't have to explore each text composable independently.
Also it allows adding so called accessibility actions to composables. When focused accessibility services allow their users to inwoke those custom actions.
By knowing these it would be nice to improve the accessibility of the timeline in a way so each item on the timeline correspond to single composable and from accessibility service perspective children composables are merged into this main view. Merging all these as they are won't work well as we need to provide an extra content for some matrix event types such as filename and size for attachments, making display names, time stamps should be made a part of the content description of the merged composable.
Of course this would prevent screen reader users touching individual actionable composables such as display name, the timestamp, attachment filename and similar. To remedy this, these click handlers should be implemented as accessible actions on the merged composable corresponding with the item on the timeline.
Some articles explaining these Jetpack compose features and techniques:
* [accessibility best practices](https://dev.to/carlosmonzon/jetpack-compose-accessibility-best-practices-38j0) - be sure to read the Semantic heading and its subheadings.
* [Semantics in Compose](https://developer.android.com/jetpack/compose/semantics) - Provides an overview how to go about implementing this including custom merge strategies.
* [Compose Accessibility](https://developer.android.com/jetpack/compose/accessibility) - Under Merge elements heading it discusses our exact use case, so if possible we should get an inspiration from there.
If you can please consider this pattern for the timeline view.
### Have you considered any alternatives?
_No response_
### Additional context
_No response_
### Are you willing to provide a PR?
No
Contributor guide
Assessment
This issue has not been assessed yet.