Ensure that room / space avatar always have a contentDescription.

This commit is contained in:
Benoit Marty
2026-01-02 16:23:15 +01:00
parent 78ad8056a1
commit 5b6dfca5d3
4 changed files with 5 additions and 5 deletions

View File

@@ -404,7 +404,7 @@ private fun RoomHeaderSection(
}.toImmutableList(),
isTombstoned = isTombstoned,
),
contentDescription = avatarUrl?.let { stringResource(CommonStrings.a11y_room_avatar) },
contentDescription = stringResource(CommonStrings.a11y_room_avatar),
modifier = Modifier
.clickable(
enabled = avatarUrl != null,

View File

@@ -115,7 +115,7 @@ private fun SpaceInfoSection(
Avatar(
avatarData = AvatarData(roomId.value, name, avatarUrl, AvatarSize.SpaceListItem),
avatarType = AvatarType.Space(),
contentDescription = avatarUrl?.let { stringResource(CommonStrings.a11y_avatar) },
contentDescription = stringResource(CommonStrings.a11y_avatar),
)
Spacer(Modifier.width(16.dp))
Column {

View File

@@ -66,7 +66,7 @@ fun UserProfileHeaderSection(
Avatar(
avatarData = AvatarData(userId.value, userName, avatarUrl, AvatarSize.UserHeader),
avatarType = AvatarType.User,
contentDescription = avatarUrl?.let { stringResource(CommonStrings.a11y_user_avatar) },
contentDescription = stringResource(CommonStrings.a11y_user_avatar),
modifier = Modifier
.clip(CircleShape)
.clickable(

View File

@@ -59,7 +59,7 @@ fun DmAvatars(
Avatar(
avatarData = userAvatarData,
avatarType = AvatarType.User,
contentDescription = userAvatarData.url?.let { stringResource(CommonStrings.a11y_your_avatar) },
contentDescription = stringResource(CommonStrings.a11y_your_avatar),
modifier = Modifier
.align(Alignment.BottomStart)
.graphicsLayer {
@@ -94,7 +94,7 @@ fun DmAvatars(
Avatar(
avatarData = otherUserAvatarData,
avatarType = AvatarType.User,
contentDescription = otherUserAvatarData.url?.let { stringResource(CommonStrings.a11y_other_user_avatar) },
contentDescription = stringResource(CommonStrings.a11y_other_user_avatar),
modifier = Modifier
.align(Alignment.TopEnd)
.clip(CircleShape)