android-maps-compose: Maps: Does not support overriding accessibility
Environment details
Compose Maps: com.google.maps.android:maps-compose:2.11.4
Steps to reproduce
The Compose GoogleMap
function does not support overriding the accessibility options. In my case, I am trying to get the map to not be read out by screen readers. Previously, with the XML setup, we did this with android:importantForAccessibility="noHideDescendants"
, however using clearAndSetSemantics
does not work for the compose view.
Code example
GoogleMap(
cameraPositionState = cameraPositionState,
modifier = Modifier.clearAndSetSemantics {},
)
Markers also do not support a custom modifier, meaning they cannot have custom screen readouts, or custom tagging for tests
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 4
- Comments: 15 (4 by maintainers)
If you would like to upvote the priority of this issue, please comment below or react with đź‘Ť so we can see what is popular when we triage.
@jacob-williams-kr Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:
google-maps
tagThis is an automated message, feel free to ignore.
Thank you for sharing how this can help wtih accessibility for apps built with the Maps Compose library. Raising the priority and will evaluate whether we can raise it even further.
We have a large app that services millions of people worldwide every day; this is a significant issue for our travelers using talkback. I want the option to remove the click on the map and hide the marker from talkback because, in our use case, it is for decoration purposes only.
This issue significantly impacts our project’s efforts to enhance accessibility support.
We cannot modify or remove semantic properties using modifiers.
Moreover, TalkBack consistently announces “Double tap to activate,” regardless of whether we include any onClick callbacks. This behavior remains even when we’re exclusively utilizing it as a non-interactive static map, without any enabled gestures or controls.
It’s worth noting that tapping directly on a marker also triggers focus when using TalkBack. It will be announced as “Marker title Double tap to activate.”
To mitigate this, the only solution we’ve found for the map is as follows:
This approach ensures that the map itself is not announced as an interactive element. However, this workaround cannot be applied to markers.
This is significantly affecting me. I am making new features for an app with millions of users. I want to disable all accessibility features for the map and its pins. We have specific features for accessibility users that we want to guide them to but this bug limits our ability to do so…
Bravo.