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.
This commit is contained in:
Mauro Romito
2026-06-22 13:35:18 +02:00
committed by Mauro
parent ed58120fd3
commit d60b41a05f
3 changed files with 3 additions and 2 deletions
@@ -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";
+1 -1
View File
@@ -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") }
@@ -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)