Merge pull request #6826 from element-hq/feature/bma/a11y/avatarEdit

Hide edit pencil from accessibility
This commit is contained in:
Benoit Marty 2026-05-20 15:58:05 +02:00 committed by GitHub
commit 0725c16471
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -42,6 +42,7 @@ import androidx.compose.ui.platform.LocalLayoutDirection
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.hideFromAccessibility
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.dp
@ -196,7 +197,10 @@ private fun BoxScope.OverlayEditButton(
.clip(CircleShape)
.clickable(interactionSource = interactionSource, onClick = onClick, indication = null)
.background(ElementTheme.colors.bgCanvasDefault)
.border(BorderStroke(1.dp, ElementTheme.colors.borderInteractiveSecondary), shape = CircleShape),
.border(BorderStroke(1.dp, ElementTheme.colors.borderInteractiveSecondary), shape = CircleShape)
.clearAndSetSemantics {
hideFromAccessibility()
},
contentAlignment = Alignment.Center,
) {
Icon(