From d60b41a05fdb596d6033bfd4f1e59308137268b2 Mon Sep 17 00:00:00 2001 From: Mauro Romito Date: Mon, 22 Jun 2026 13:35:18 +0200 Subject: [PATCH] Add a programmatic label to the join room by address field The field relied on its placeholder for a label, which VoiceOver only reads while empty. Set a persistent accessibility label so it's always announced. Addresses #5256. --- .../Resources/Localizations/en-US.lproj/Localizable.strings | 2 +- ElementX/Sources/Generated/Strings.swift | 2 +- .../Screens/StartChatScreen/View/JoinRoomByAddressView.swift | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings index a7aaf13b0..0f4af23d2 100644 --- a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings @@ -1540,7 +1540,7 @@ "screen_start_chat_error_starting_chat" = "An error occurred when trying to start a chat"; "screen_start_chat_join_room_by_address_action" = "Join room by address"; "screen_start_chat_join_room_by_address_invalid_address" = "Not a valid address"; -"screen_start_chat_join_room_by_address_placeholder" = "Enter..."; +"screen_start_chat_join_room_by_address_placeholder" = "Enter Address..."; "screen_start_chat_join_room_by_address_room_found" = "Matching room found"; "screen_start_chat_join_room_by_address_room_not_found" = "Room not found"; "screen_start_chat_join_room_by_address_supporting_text" = "e.g. #room-name:matrix.org"; diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index 80afadb10..7c7de168b 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -3553,7 +3553,7 @@ internal nonisolated enum L10n { internal static var screenStartChatJoinRoomByAddressAction: String { return L10n.tr("Localizable", "screen_start_chat_join_room_by_address_action") } /// Not a valid address internal static var screenStartChatJoinRoomByAddressInvalidAddress: String { return L10n.tr("Localizable", "screen_start_chat_join_room_by_address_invalid_address") } - /// Enter... + /// Enter Address... internal static var screenStartChatJoinRoomByAddressPlaceholder: String { return L10n.tr("Localizable", "screen_start_chat_join_room_by_address_placeholder") } /// Matching room found internal static var screenStartChatJoinRoomByAddressRoomFound: String { return L10n.tr("Localizable", "screen_start_chat_join_room_by_address_room_found") } diff --git a/ElementX/Sources/Screens/StartChatScreen/View/JoinRoomByAddressView.swift b/ElementX/Sources/Screens/StartChatScreen/View/JoinRoomByAddressView.swift index ef913bfbb..4ca1c3b9a 100644 --- a/ElementX/Sources/Screens/StartChatScreen/View/JoinRoomByAddressView.swift +++ b/ElementX/Sources/Screens/StartChatScreen/View/JoinRoomByAddressView.swift @@ -53,6 +53,7 @@ struct JoinRoomByAddressView: View { .textInputAutocapitalization(.never) .autocorrectionDisabled() .textContentType(.URL) + .accessibilityLabel(L10n.screenStartChatJoinRoomByAddressPlaceholder) .focused($textFieldFocus) .onChange(of: context.roomAddress) { _, newValue in context.roomAddress = newValue.trimmingCharacters(in: .whitespacesAndNewlines)