diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversations/messages/item/MessageStatusIndicator.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversations/messages/item/MessageStatusIndicator.kt
index 0d4d08001d..772bb6a584 100644
--- a/app/src/main/kotlin/com/wire/android/ui/home/conversations/messages/item/MessageStatusIndicator.kt
+++ b/app/src/main/kotlin/com/wire/android/ui/home/conversations/messages/item/MessageStatusIndicator.kt
@@ -102,7 +102,7 @@ fun MessageStatusIndicator(
modifier = modifier,
painter = painterResource(id = R.drawable.ic_warning_circle),
tint = errorTint,
- contentDescription = stringResource(R.string.content_description_message_error_status),
+ contentDescription = null,
)
}
}
diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversations/messages/item/RegularMessageItemLeading.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversations/messages/item/RegularMessageItemLeading.kt
index 2fffebeb77..2866b2955e 100644
--- a/app/src/main/kotlin/com/wire/android/ui/home/conversations/messages/item/RegularMessageItemLeading.kt
+++ b/app/src/main/kotlin/com/wire/android/ui/home/conversations/messages/item/RegularMessageItemLeading.kt
@@ -19,11 +19,14 @@ package com.wire.android.ui.home.conversations.messages.item
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
+import androidx.compose.ui.res.stringResource
+import com.wire.android.R
import com.wire.android.model.Clickable
import com.wire.android.model.UserAvatarData
import com.wire.android.ui.common.avatar.UserProfileAvatar
import com.wire.android.ui.common.avatar.UserProfileAvatarType.WithIndicators
import com.wire.android.ui.home.conversations.model.MessageHeader
+import com.wire.android.ui.common.R as commonR
@Composable
fun RegularMessageItemLeading(
@@ -35,15 +38,31 @@ fun RegularMessageItemLeading(
val isProfileRedirectEnabled =
header.userId != null && !(header.isSenderDeleted || header.isSenderUnavailable)
if (showAuthor) {
- val avatarClickable = remember {
- Clickable(enabled = isProfileRedirectEnabled) {
+ val openProfileDescription = stringResource(
+ id = R.string.content_description_open_user_profile_label
+ )
+ val avatarClickable = remember(isProfileRedirectEnabled, header.userId, openProfileDescription, onOpenProfile) {
+ Clickable(
+ enabled = isProfileRedirectEnabled,
+ onClickDescription = openProfileDescription
+ ) {
onOpenProfile(header.userId!!.toString())
}
}
+ val avatarStatusDescription = userAvatarData.getAvailabilityStatusDescriptionId()
+ ?.let { stringResource(id = it) }
+ ?: stringResource(id = commonR.string.user_profile_status_none)
+ val avatarContentDescription = listOfNotNull(
+ stringResource(id = commonR.string.content_description_user_avatar),
+ header.username.asString(),
+ avatarStatusDescription,
+ openProfileDescription.takeIf { isProfileRedirectEnabled }
+ ).joinToString(", ")
// because avatar takes start padding we don't need to add padding to message item
UserProfileAvatar(
avatarData = userAvatarData,
clickable = avatarClickable,
+ contentDescription = avatarContentDescription,
type = header.guestExpiresAt?.let { WithIndicators.TemporaryUser(it) } ?: WithIndicators.RegularUser(false)
)
}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 13d1711c2b..51c9a15c51 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -106,13 +106,14 @@
Delete the conversation
Start audio call
Wire
- Enable rich text mode button
- Enable drawing mode button
- Rich text formatting Header
- Rich text formatting Bold
- Rich text formatting Italic
- Send Emoticon button
- Send GIF button
+ Open formatting options
+ Enable drawing mode
+ Use a heading
+ Use bolded text
+ Use italic text
+ Close formatting options
+ Send Emoticon
+ Send GIF
Mention someone
Go back to conversation list
open conversation details
@@ -134,7 +135,7 @@
Right arrow
Go back
Mention icon
- Attach new item to conversation
+ Add attachment
Open Message Details
Copy the message
Share the selected file with other app
diff --git a/core/ui-common/src/main/kotlin/com/wire/android/ui/common/avatar/UserProfileAvatar.kt b/core/ui-common/src/main/kotlin/com/wire/android/ui/common/avatar/UserProfileAvatar.kt
index 4652b6e479..3f2e8e9669 100644
--- a/core/ui-common/src/main/kotlin/com/wire/android/ui/common/avatar/UserProfileAvatar.kt
+++ b/core/ui-common/src/main/kotlin/com/wire/android/ui/common/avatar/UserProfileAvatar.kt
@@ -148,11 +148,22 @@ fun UserProfileAvatar(
legalHoldIndicatorVisible = false
),
) {
+ val accessibilityModifier = if (contentDescription != null) {
+ Modifier.clearAndSetSemantics {
+ this.contentDescription = contentDescription
+ if (clickable?.enabled == true) {
+ role = Role.Button
+ }
+ }
+ } else {
+ Modifier
+ }
Box(
contentAlignment = Alignment.Center,
modifier = modifier
.wrapContentSize()
.clip(CircleShape)
+ .then(accessibilityModifier)
.clickable(clickable)
) {
var userStatusIndicatorParams by remember { mutableStateOf(Size.Zero to Offset.Zero) }