element-hq / element-hq/element-x-android
accessibility: use talkback actions as alternative to the bottom sheet on long-press
- 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?
I would like to have an easier way to access message actions, such as react, reply, etc
#### Why would you like to do it?
Screenreader users, especially on mobile, are inconvenienced a lot by UI clutter. For example, having to swipe right three or so times to get to the next message in the timeline is a problem, so is having to long double press, then wait for the timeout to pass, only then finally being focused on the bottom sheet with options
#### How would you like to achieve it?
For this, [accessibility actions](https://developer.android.com/reference/kotlin/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.AccessibilityActionCompat) are the best fit for what I'm describing.
The screenreader knows how to use them, and more specifically, it emulates better what users have had on ios for a long time for decluttering UI, namely the rotor, where elements are a single swipe targets and, instead of each option being swipe targets after that element, they are incapsulated in those actions one could reach by spinning the rotor to actions and then flicking up and down to select the required action, then double-tapping to confirm.
For more information, see [this part of an article from android developer documentation](https://developer.android.com/guide/topics/ui/accessibility/principles#accessibility-actions)
### Have you considered any alternatives?
well, the only alternative is using swipe targets like we did up to this point, with the bottom sheet activating on long press. While better than the every option is a swipe target method, it still requires waiting around for the timeout to pass, which could be frustrating if you have to do an action to afew messages, not just one per minute or so
### Additional context
_No response_
### Are you willing to provide a PR?
No
Contributor guide
Assessment
This issue has not been assessed yet.