Colton Idle
11/12/2025, 5:07 PMSingleChoiceSegmentedButtonRow 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:
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 linesChrimaeon
11/12/2025, 5:30 PMColton Idle
11/12/2025, 5:34 PM