[a11y] Improve accessibility of screen headers.

This commit is contained in:
Benoit Marty 2026-05-20 15:52:46 +02:00
parent 97ca702bc8
commit 798ed7b6c3

View file

@ -354,7 +354,8 @@ private fun EmptySpaceView(
title = stringResource(R.string.screen_space_empty_state_title), title = stringResource(R.string.screen_space_empty_state_title),
subTitle = null, subTitle = null,
iconStyle = BigIcon.Style.Default(vectorIcon = CompoundIcons.Room(), usePrimaryTint = true), iconStyle = BigIcon.Style.Default(vectorIcon = CompoundIcons.Room(), usePrimaryTint = true),
modifier = Modifier.fillMaxWidth() modifier = Modifier
.fillMaxWidth()
.padding(top = 40.dp, start = 24.dp, end = 24.dp, bottom = 24.dp), .padding(top = 40.dp, start = 24.dp, end = 24.dp, bottom = 24.dp),
) )
ButtonColumnMolecule( ButtonColumnMolecule(
@ -425,6 +426,7 @@ private fun SpaceViewTopBar(
modifier = Modifier modifier = Modifier
.clip(roundedCornerShape) .clip(roundedCornerShape)
.clickable(enabled = canAccessSpaceSettings, onClick = onSettingsClick) .clickable(enabled = canAccessSpaceSettings, onClick = onSettingsClick)
.semantics { heading() }
) )
}, },
actions = { actions = {
@ -532,6 +534,7 @@ private fun ManageModeTopBar(
Text( Text(
text = pluralStringResource(CommonPlurals.common_selected_count, selectedCount, selectedCount), text = pluralStringResource(CommonPlurals.common_selected_count, selectedCount, selectedCount),
style = ElementTheme.typography.fontBodyLgMedium, style = ElementTheme.typography.fontBodyLgMedium,
modifier = Modifier.semantics { heading() },
) )
}, },
actions = { actions = {
@ -585,10 +588,7 @@ private fun SpaceAvatarAndNameRow(
) )
Text( Text(
modifier = Modifier modifier = Modifier
.padding(horizontal = 8.dp) .padding(horizontal = 8.dp),
.semantics {
heading()
},
text = name ?: stringResource(CommonStrings.common_no_space_name), text = name ?: stringResource(CommonStrings.common_no_space_name),
style = ElementTheme.typography.fontBodyLgMedium, style = ElementTheme.typography.fontBodyLgMedium,
fontStyle = FontStyle.Italic.takeIf { name == null }, fontStyle = FontStyle.Italic.takeIf { name == null },