From b6f79a883e74c94150c928014f9477ef41a2ace3 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 3 Jul 2026 12:21:24 +0200 Subject: [PATCH] Improve accessibility text on RR --- .../receipt/TimelineItemReadReceiptView.kt | 14 +++++++++----- .../ui-strings/src/main/res/values/localazy.xml | 9 +++++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/receipt/TimelineItemReadReceiptView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/receipt/TimelineItemReadReceiptView.kt index 3ccf32d422..c9b712eba7 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/receipt/TimelineItemReadReceiptView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/receipt/TimelineItemReadReceiptView.kt @@ -61,10 +61,7 @@ fun TimelineItemReadReceiptView( ReadReceiptsRow(modifier = modifier) { ReadReceiptsAvatars( receipts = state.receipts, - modifier = Modifier - .clip(RoundedCornerShape(4.dp)) - .clickable(onClick = onReadReceiptsClick) - .padding(2.dp) + onClick = onReadReceiptsClick, ) } } else { @@ -124,7 +121,8 @@ private fun ReadReceiptsRow( @Composable private fun ReadReceiptsAvatars( receipts: ImmutableList, - modifier: Modifier = Modifier + onClick: () -> Unit, + modifier: Modifier = Modifier, ) { val avatarSize = AvatarSize.TimelineReadReceipt.dp val avatarStrokeSize = 1.dp @@ -132,6 +130,12 @@ private fun ReadReceiptsAvatars( val receiptDescription = computeReceiptDescription(receipts) Row( modifier = modifier + .clip(RoundedCornerShape(4.dp)) + .clickable( + onClick = onClick, + onClickLabel = stringResource(id = CommonStrings.a11y_read_receipts_tap_to_show_all_android), + ) + .padding(2.dp) .clearAndSetSemantics { testTag = TestTags.messageReadReceipts.value contentDescription = receiptDescription diff --git a/libraries/ui-strings/src/main/res/values/localazy.xml b/libraries/ui-strings/src/main/res/values/localazy.xml index 4885c38ef3..82acfd14b3 100644 --- a/libraries/ui-strings/src/main/res/values/localazy.xml +++ b/libraries/ui-strings/src/main/res/values/localazy.xml @@ -44,13 +44,14 @@ "QR Code" "React with %1$s" "React with other emojis" - "Read by %1$s and %2$s" + "Previous message read by %1$s and %2$s" - "Read by %1$s and %2$d other" - "Read by %1$s and %2$d others" + "Previous message read by %1$s and %2$d other" + "Previous message read by %1$s and %2$d others" - "Read by %1$s" + "Previous message read by %1$s" "Tap to show all" + "show all read receipts" "Remove reaction: %1$s" "Remove reaction with %1$s" "Room avatar"