Skip to content

Commit 0044875

Browse files
committed
Ensure that room / space avatar always have a contentDescription.
1 parent 233d223 commit 0044875

File tree

4 files changed

+5
-5
lines changed
  • features
  • libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/avatar

4 files changed

+5
-5
lines changed

features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ private fun RoomHeaderSection(
404404
}.toImmutableList(),
405405
isTombstoned = isTombstoned,
406406
),
407-
contentDescription = avatarUrl?.let { stringResource(CommonStrings.a11y_room_avatar) },
407+
contentDescription = stringResource(CommonStrings.a11y_room_avatar),
408408
modifier = Modifier
409409
.clickable(
410410
enabled = avatarUrl != null,

features/space/impl/src/main/kotlin/io/element/android/features/space/impl/settings/SpaceSettingsView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private fun SpaceInfoSection(
115115
Avatar(
116116
avatarData = AvatarData(roomId.value, name, avatarUrl, AvatarSize.SpaceListItem),
117117
avatarType = AvatarType.Space(),
118-
contentDescription = avatarUrl?.let { stringResource(CommonStrings.a11y_avatar) },
118+
contentDescription = stringResource(CommonStrings.a11y_avatar),
119119
)
120120
Spacer(Modifier.width(16.dp))
121121
Column {

features/userprofile/shared/src/main/kotlin/io/element/android/features/userprofile/shared/UserProfileHeaderSection.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ fun UserProfileHeaderSection(
6666
Avatar(
6767
avatarData = AvatarData(userId.value, userName, avatarUrl, AvatarSize.UserHeader),
6868
avatarType = AvatarType.User,
69-
contentDescription = avatarUrl?.let { stringResource(CommonStrings.a11y_user_avatar) },
69+
contentDescription = stringResource(CommonStrings.a11y_user_avatar),
7070
modifier = Modifier
7171
.clip(CircleShape)
7272
.clickable(

libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/avatar/DmAvatars.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ fun DmAvatars(
5959
Avatar(
6060
avatarData = userAvatarData,
6161
avatarType = AvatarType.User,
62-
contentDescription = userAvatarData.url?.let { stringResource(CommonStrings.a11y_your_avatar) },
62+
contentDescription = stringResource(CommonStrings.a11y_your_avatar),
6363
modifier = Modifier
6464
.align(Alignment.BottomStart)
6565
.graphicsLayer {
@@ -94,7 +94,7 @@ fun DmAvatars(
9494
Avatar(
9595
avatarData = otherUserAvatarData,
9696
avatarType = AvatarType.User,
97-
contentDescription = otherUserAvatarData.url?.let { stringResource(CommonStrings.a11y_other_user_avatar) },
97+
contentDescription = stringResource(CommonStrings.a11y_other_user_avatar),
9898
modifier = Modifier
9999
.align(Alignment.TopEnd)
100100
.clip(CircleShape)

0 commit comments

Comments
 (0)