googlemaps / googlemaps/android-maps-compose

Clustering: ClusterContent's and ItemContent's `contentDescription` is not taken into account for talkback accessibility .

Open
#706 7 comments 0 reactions 0 assignees View on GitHub
priority: p1 type: bug
Dominant language
Kotlin
Stars
1.3k
Forks
181
Avg merge
2d 23h
Merged PRs (30d)
18

Description

#### Environment details
Android API 35
Library Version: 6.1.1

#### Steps to reproduce
1. Create a GoogleMap composable with a Clustering composable inside of it.
2. The Clustering's ItemContent and ClusterContent params are setup with custom composables which have their `contentDescription` set to different texts(i.e. for cluster: "Cluster of x items" and for markers "Marker with y title").
3. Activate Talkback on the Android OS.
4. Run the app
5. Try to select a cluster or a marker
6. Actual result: Talkback says "Map Marker" instead of the expected "Cluster of x items"/"Marker with y title"

#### Code example
This is an example how we have setup the renderer for the Clustering:
```
val renderer = rememberClusterRenderer(
clusterContent = { cluster ->
ClusterContent(
numberOfItems = totalItemCount,
isSelected = isSelected
)
},
clusterItemContent = { mapItemGroup ->
if (isStacked()) {
StackedMarkerContent(
items = items,
)
} else {
CustomItemMarkerContent(
item = items.first()
)
}
},
clusterManager = clusterManager
)
```
Please note that i've noticed that in the top left corner of the map there are some invisible marker/cluster views which are selectable by talkback and those have the content description correctly read by talkback.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.