Skip to content

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

@esalavastru

Description

@esalavastru

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions