Skip to content

Commit 3c68dd8

Browse files
committed
Improve accessibility.
1 parent e857bd7 commit 3c68dd8

File tree

1 file changed

+4
-1
lines changed
  • libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components

1 file changed

+4
-1
lines changed

libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/SelectedRoom.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,14 @@ fun SelectedRoom(
6161
modifier: Modifier = Modifier,
6262
) {
6363
val actionRemove = stringResource(id = CommonStrings.action_remove)
64+
val a11yRoomName = stringResource(id = CommonStrings.common_room_name)
6465
Box(
6566
modifier = modifier
6667
.width(AvatarSize.SelectedRoom.dp)
6768
.clearAndSetSemantics {
68-
contentDescription = roomInfo.name ?: "#"
69+
contentDescription = roomInfo.name
70+
?: roomInfo.canonicalAlias?.value
71+
?: a11yRoomName
6972
// Note: this does not set the click effect to the whole Box
7073
// when talkback is not enabled
7174
onClick(

0 commit comments

Comments
 (0)