Skip to content
Snippets Groups Projects
Commit c1b31987 authored by Aleksandras Kostarevas's avatar Aleksandras Kostarevas
Browse files

Force focus voice input for accessibility

parent 0e470f4c
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,8 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.semantics.traversalIndex
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import kotlinx.coroutines.Dispatchers
......@@ -171,7 +173,10 @@ private class VoiceInputActionWindow(
onClick = { recognizerView.value?.finish() },
role = null,
indication = null,
interactionSource = remember { MutableInteractionSource() })) {
interactionSource = remember { MutableInteractionSource() })
.semantics(mergeDescendants = true) {
traversalIndex = -1.0f
}) {
Box(modifier = Modifier.align(Alignment.Center)) {
when {
modelException.value != null -> ModelDownloader(modelException.value!!)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment