[a11y] Add heading() to date separators.

This commit is contained in:
Benoit Marty 2025-07-04 12:16:05 +02:00
parent 70aa31df00
commit 2ba54105d2
2 changed files with 12 additions and 1 deletions

View file

@ -14,6 +14,8 @@ import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.heading
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.unit.dp
import io.element.android.compound.theme.ElementTheme
@ -36,6 +38,10 @@ internal fun TimelineItemDaySeparatorView(
contentAlignment = Alignment.Center,
) {
Text(
modifier = modifier
.semantics {
heading()
},
text = model.formattedDate,
style = ElementTheme.typography.fontBodyMdMedium,
color = ElementTheme.colors.textPrimary,