[a11y] Ensure that the loading state is read out.
This commit is contained in:
parent
4618730ff0
commit
a1fc4487f3
2 changed files with 12 additions and 0 deletions
|
|
@ -20,8 +20,10 @@ import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
|
import androidx.compose.ui.semantics.ProgressBarRangeInfo
|
||||||
import androidx.compose.ui.semantics.contentDescription
|
import androidx.compose.ui.semantics.contentDescription
|
||||||
import androidx.compose.ui.semantics.focused
|
import androidx.compose.ui.semantics.focused
|
||||||
|
import androidx.compose.ui.semantics.progressBarRangeInfo
|
||||||
import androidx.compose.ui.semantics.semantics
|
import androidx.compose.ui.semantics.semantics
|
||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||||
|
|
@ -155,6 +157,10 @@ private fun IncomingVerificationHeader(step: Step, request: VerificationRequest.
|
||||||
.semantics(mergeDescendants = true) {
|
.semantics(mergeDescendants = true) {
|
||||||
contentDescription = timeLimitMessage
|
contentDescription = timeLimitMessage
|
||||||
focused = true
|
focused = true
|
||||||
|
if (iconStyle == BigIcon.Style.Loading) {
|
||||||
|
// Same code than Modifier.progressSemantics()
|
||||||
|
progressBarRangeInfo = ProgressBarRangeInfo.Indeterminate
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.focusable(),
|
.focusable(),
|
||||||
iconStyle = iconStyle,
|
iconStyle = iconStyle,
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,10 @@ import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
|
import androidx.compose.ui.semantics.ProgressBarRangeInfo
|
||||||
import androidx.compose.ui.semantics.contentDescription
|
import androidx.compose.ui.semantics.contentDescription
|
||||||
import androidx.compose.ui.semantics.focused
|
import androidx.compose.ui.semantics.focused
|
||||||
|
import androidx.compose.ui.semantics.progressBarRangeInfo
|
||||||
import androidx.compose.ui.semantics.semantics
|
import androidx.compose.ui.semantics.semantics
|
||||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
|
@ -195,6 +197,10 @@ private fun OutgoingVerificationHeader(step: Step, request: VerificationRequest.
|
||||||
.semantics(mergeDescendants = true) {
|
.semantics(mergeDescendants = true) {
|
||||||
contentDescription = timeLimitMessage
|
contentDescription = timeLimitMessage
|
||||||
focused = true
|
focused = true
|
||||||
|
if (iconStyle == BigIcon.Style.Loading) {
|
||||||
|
// Same code than Modifier.progressSemantics()
|
||||||
|
progressBarRangeInfo = ProgressBarRangeInfo.Indeterminate
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.focusable(),
|
.focusable(),
|
||||||
iconStyle = iconStyle,
|
iconStyle = iconStyle,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue