Skip to content

Commit df9a3fe

Browse files
committed
[a11y] Improve accessibility of screen headers.
1 parent c2e357c commit df9a3fe

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

  • features/joinroom/impl/src/main/kotlin/io/element/android/features/joinroom/impl

features/joinroom/impl/src/main/kotlin/io/element/android/features/joinroom/impl/JoinRoomView.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ private fun JoinRoomTopBar(
609609
val roundedCornerShape = RoundedCornerShape(8.dp)
610610
val titleModifier = Modifier
611611
.clip(roundedCornerShape)
612+
.semantics { heading() }
612613
if (contentState.name != null) {
613614
Row(
614615
modifier = titleModifier,
@@ -621,10 +622,7 @@ private fun JoinRoomTopBar(
621622
)
622623
Text(
623624
modifier = Modifier
624-
.padding(horizontal = 8.dp)
625-
.semantics {
626-
heading()
627-
},
625+
.padding(horizontal = 8.dp),
628626
text = contentState.name,
629627
style = ElementTheme.typography.fontBodyLgMedium,
630628
maxLines = 1,

0 commit comments

Comments
 (0)