Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e231c7b5 authored by Anton Potapov's avatar Anton Potapov
Browse files

Make ToggleButtonComponent Switch for a11y semantics

Flag: aconfig new_volume_panel TRUNKFOOD
Test: manual with voice over
Fixes: 331728705
Change-Id: Idb73eebd198f87e15b7245fa28f23261caf287f1
parent 7e865633
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -32,8 +32,10 @@ import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.role
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
@@ -62,7 +64,10 @@ class ToggleButtonComponent(
        ) {
            OutlinedIconToggleButton(
                modifier =
                    Modifier.height(64.dp).fillMaxWidth().semantics { contentDescription = label },
                    Modifier.height(64.dp).fillMaxWidth().semantics {
                        role = Role.Switch
                        contentDescription = label
                    },
                checked = viewModel.isChecked,
                onCheckedChange = onCheckedChange,
                shape = RoundedCornerShape(28.dp),