Accessibility label for editing the avatar (#4304)

* accessibility label for editing the avatar

* always read edit avatar
This commit is contained in:
Mauro
2025-07-08 15:29:02 +02:00
committed by GitHub
parent 834283e879
commit a6a536dae7
3 changed files with 5 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
"a11y_add_reaction" = "Add reaction: %1$@";
"a11y_avatar" = "Avatar";
"a11y_delete" = "Delete";
"a11y_edit_avatar" = "Edit avatar";
"a11y_hide_password" = "Hide password";
"a11y_join_call" = "Join call";
"a11y_jump_to_bottom" = "Jump to bottom";

View File

@@ -22,6 +22,8 @@ internal enum L10n {
internal static func a11yDigitsEntered(_ p1: Int) -> String {
return L10n.tr("Localizable", "a11y_digits_entered", p1)
}
/// Edit avatar
internal static var a11yEditAvatar: String { return L10n.tr("Localizable", "a11y_edit_avatar") }
/// Hide password
internal static var a11yHidePassword: String { return L10n.tr("Localizable", "a11y_hide_password") }
/// Join call

View File

@@ -60,6 +60,7 @@ struct RoomDetailsEditScreen: View {
contentID: context.viewState.roomID,
avatarSize: .user(on: .memberDetails),
mediaProvider: context.mediaProvider)
.accessibilityLabel(L10n.a11yEditAvatar)
.overlay(alignment: .bottomTrailing) {
if context.viewState.canEditAvatar {
avatarOverlayIcon
@@ -120,6 +121,7 @@ struct RoomDetailsEditScreen: View {
Circle()
.foregroundColor(.black)
}
.accessibilityHidden(true)
}
@ViewBuilder