From dc29be5898f0e197184c3a22e6d3b6647e8d04ef Mon Sep 17 00:00:00 2001 From: Mauro Romito Date: Tue, 16 Jun 2026 17:27:29 +0200 Subject: [PATCH] voiceover reads add avatar when there is no avatar yet --- .../Resources/Localizations/en-US.lproj/Localizable.strings | 1 + ElementX/Resources/Localizations/en.lproj/Localizable.strings | 1 + ElementX/Sources/Generated/Strings.swift | 2 ++ .../Screens/CreateRoomScreen/View/CreateRoomScreen.swift | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings index 8d718af3b..e0914e486 100644 --- a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings @@ -1,3 +1,4 @@ +"a11y_add_avatar" = "Add avatar"; "a11y_add_reaction" = "Add reaction: %1$@"; "a11y_address" = "Address"; "a11y_avatar" = "Avatar"; diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings index d9a13ac65..ffbd319e9 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings @@ -1,3 +1,4 @@ +"a11y_add_avatar" = "Add avatar"; "a11y_add_reaction" = "Add reaction: %1$@"; "a11y_address" = "Address"; "a11y_avatar" = "Avatar"; diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index a19e584b8..f81ab6f3f 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -10,6 +10,8 @@ import Foundation // swiftlint:disable explicit_type_interface function_parameter_count identifier_name line_length // swiftlint:disable nesting type_body_length type_name vertical_whitespace_opening_braces internal enum L10n { + /// Add avatar + internal static var a11yAddAvatar: String { return L10n.tr("Localizable", "a11y_add_avatar") } /// Add reaction: %1$@ internal static func a11yAddReaction(_ p1: Any) -> String { return L10n.tr("Localizable", "a11y_add_reaction", String(describing: p1)) diff --git a/ElementX/Sources/Screens/CreateRoomScreen/View/CreateRoomScreen.swift b/ElementX/Sources/Screens/CreateRoomScreen/View/CreateRoomScreen.swift index a45a62dbf..9a8c8f089 100644 --- a/ElementX/Sources/Screens/CreateRoomScreen/View/CreateRoomScreen.swift +++ b/ElementX/Sources/Screens/CreateRoomScreen/View/CreateRoomScreen.swift @@ -132,7 +132,7 @@ struct CreateRoomScreen: View { .accessibilityHidden(true) } } - .accessibilityLabel(L10n.a11yEditAvatar) + .accessibilityLabel(context.viewState.avatarImage == nil ? L10n.a11yAddAvatar : L10n.a11yEditAvatar) .accessibilityRemoveTraits(.isHeader) .buttonStyle(.plain) .accessibilityIdentifier(A11yIdentifiers.createRoomScreen.roomAvatar)