a11y: add heading to the title.
This commit is contained in:
parent
c5964f5801
commit
9de94543f6
1 changed files with 6 additions and 1 deletions
|
|
@ -25,6 +25,8 @@ import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.clipToBounds
|
import androidx.compose.ui.draw.clipToBounds
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
|
import androidx.compose.ui.semantics.heading
|
||||||
|
import androidx.compose.ui.semantics.semantics
|
||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||||
|
|
@ -222,7 +224,10 @@ private fun ColumnScope.Title() {
|
||||||
Text(
|
Text(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.align(Alignment.CenterHorizontally)
|
.align(Alignment.CenterHorizontally)
|
||||||
.padding(top = 16.dp, bottom = 8.dp, start = 16.dp, end = 16.dp),
|
.padding(top = 16.dp, bottom = 8.dp, start = 16.dp, end = 16.dp)
|
||||||
|
.semantics {
|
||||||
|
heading()
|
||||||
|
},
|
||||||
text = stringResource(R.string.screen_media_details_title),
|
text = stringResource(R.string.screen_media_details_title),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
style = ElementTheme.typography.fontBodyLgMedium,
|
style = ElementTheme.typography.fontBodyLgMedium,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue