mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
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:
@@ -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";
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user