Improve accessibility text on RR

This commit is contained in:
Benoit Marty
2026-07-03 12:21:24 +02:00
parent 60837c0d7d
commit b6f79a883e
2 changed files with 14 additions and 9 deletions
@@ -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<ReadReceiptData>,
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
@@ -44,13 +44,14 @@
<string name="a11y_qr_code">"QR Code"</string>
<string name="a11y_react_with">"React with %1$s"</string>
<string name="a11y_react_with_other_emojis">"React with other emojis"</string>
<string name="a11y_read_receipts_multiple">"Read by %1$s and %2$s"</string>
<string name="a11y_read_receipts_multiple">"Previous message read by %1$s and %2$s"</string>
<plurals name="a11y_read_receipts_multiple_with_others">
<item quantity="one">"Read by %1$s and %2$d other"</item>
<item quantity="other">"Read by %1$s and %2$d others"</item>
<item quantity="one">"Previous message read by %1$s and %2$d other"</item>
<item quantity="other">"Previous message read by %1$s and %2$d others"</item>
</plurals>
<string name="a11y_read_receipts_single">"Read by %1$s"</string>
<string name="a11y_read_receipts_single">"Previous message read by %1$s"</string>
<string name="a11y_read_receipts_tap_to_show_all">"Tap to show all"</string>
<string name="a11y_read_receipts_tap_to_show_all_android">"show all read receipts"</string>
<string name="a11y_remove_reaction">"Remove reaction: %1$s"</string>
<string name="a11y_remove_reaction_with">"Remove reaction with %1$s"</string>
<string name="a11y_room_avatar">"Room avatar"</string>