a11y question. I'm using a `SingleChoiceSegmentedB...
# compose-android
c
a11y question. I'm using a
SingleChoiceSegmentedButtonRow
from m3. My team got a report back from an accessibility audit service saying that the buttons in the row should announce the name of the overall group that they're in. I don't see an api for that. Am I missing something? My impl is basically copy pasted from the compose samples:
Copy code
fun SegmentedButtonSingleSelectSample() {
    var selectedIndex by remember { mutableStateOf(0) }
    val options = listOf("Day", "Month", "Week")
    SingleChoiceSegmentedButtonRow {
        options.forEachIndexed { index, label ->
            SegmentedButton(
                shape = SegmentedButtonDefaults.itemShape(index = index, count = options.size),
                onClick = { selectedIndex = index },
                selected = index == selectedIndex
            ) {                Text(label)            }        }    }} //moved closing braces to one line to save lines
c
Is something they want or is it something that is defined in i.e. https://www.w3.org/2004/10/wcag2-nav/wcag20.html Also you can always change the accessibility with the semantics modifiers.
c
There's no w3 link or anything that they reference. I guess my question is mostly just a sanity check to see if there is some api I'm missing here and if not... if there's a recommended approach. Currently we have it working by using clearAndSetSemantics, but now we're writing most of the selected/unselected state ourselves. Just wish I could add a row "title" almost lol and then merge that with the row.
👍🏻 1