diff --git a/Rocket.Chat/Controllers/Subscriptions/SubscriptionsList/SubscriptionsViewController.swift b/Rocket.Chat/Controllers/Subscriptions/SubscriptionsList/SubscriptionsViewController.swift index 85239c0959..b736f85dd5 100644 --- a/Rocket.Chat/Controllers/Subscriptions/SubscriptionsList/SubscriptionsViewController.swift +++ b/Rocket.Chat/Controllers/Subscriptions/SubscriptionsList/SubscriptionsViewController.swift @@ -110,6 +110,8 @@ final class SubscriptionsViewController: BaseViewController { override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() + serversView?.accessibilityViewIsModal = true + sortingView?.accessibilityViewIsModal = true serversView?.frame = frameForDropDownOverlay sortingView?.frame = frameForDropDownOverlay } @@ -237,6 +239,7 @@ final class SubscriptionsViewController: BaseViewController { self.titleView = titleView let tapGesture = UITapGestureRecognizer(target: self, action: #selector(recognizeTitleViewTapGesture(_:))) + titleView.isAccessibilityElement = true titleView.addGestureRecognizer(tapGesture) } } @@ -363,6 +366,7 @@ extension SubscriptionsViewController: UISearchBarDelegate { titleView?.updateTitleImage(reverse: true) serversView = ServersListView.showIn(view, frame: frameForDropDownOverlay) serversView?.delegate = self + UIAccessibility.post(notification: .screenChanged, argument: serversView) } func closeServersList() { diff --git a/Rocket.Chat/Resources/cs.lproj/VoiceOver.strings b/Rocket.Chat/Resources/cs.lproj/VoiceOver.strings index 9837f1bce0..0dabdb32d3 100644 --- a/Rocket.Chat/Resources/cs.lproj/VoiceOver.strings +++ b/Rocket.Chat/Resources/cs.lproj/VoiceOver.strings @@ -28,7 +28,8 @@ "subscriptions.main.userview.value" = "Server: %@. User: %@. Status: %@."; "subscriptions.main.userview.hint" = "Double tap to change status."; "subscriptions.main.channel.hint" = "Double tap to enter"; // TODO - +"subscriptions.server_button.hint" = "Double tap to add or change server"; // TODO +"subscriptions.server_button.close.hint" = "Double tap to close the server menu"; // TODO // MARK: Preferences "preferences.profile.edit.label" = "Profile picture"; // TODO diff --git a/Rocket.Chat/Resources/de.lproj/VoiceOver.strings b/Rocket.Chat/Resources/de.lproj/VoiceOver.strings index 416806c64b..8769a99927 100644 --- a/Rocket.Chat/Resources/de.lproj/VoiceOver.strings +++ b/Rocket.Chat/Resources/de.lproj/VoiceOver.strings @@ -28,6 +28,8 @@ "subscriptions.main.userview.value" = "Server: %@. Benutzer: %@. Status: %@."; "subscriptions.main.userview.hint" = "Klicken Sie doppelt, um den Status zu ändern."; "subscriptions.main.channel.hint" = "Double tap to enter"; // TODO +"subscriptions.server_button.hint" = "Double tap to add or change server"; // TODO +"subscriptions.server_button.close.hint" = "Double tap to close the server menu"; // TODO // MARK: Preferences "preferences.profile.edit.label" = "Profile picture"; // TODO diff --git a/Rocket.Chat/Resources/el.lproj/VoiceOver.strings b/Rocket.Chat/Resources/el.lproj/VoiceOver.strings index 2551268bf5..d4cc4cd18e 100644 --- a/Rocket.Chat/Resources/el.lproj/VoiceOver.strings +++ b/Rocket.Chat/Resources/el.lproj/VoiceOver.strings @@ -28,6 +28,8 @@ "subscriptions.main.userview.value" = "Εξυπηρετητής: %@. Χρήστης: %@. Κατάσταση: %@."; "subscriptions.main.userview.hint" = "Πατήστε δύο φορές για αλλαγή κατάστασης."; "subscriptions.main.channel.hint" = "Double tap to enter"; // TODO +"subscriptions.server_button.hint" = "Double tap to add or change server"; // TODO +"subscriptions.server_button.close.hint" = "Double tap to close the server menu"; // TODO // MARK: Preferences "preferences.profile.edit.label" = "Profile picture"; // TODO diff --git a/Rocket.Chat/Resources/en.lproj/VoiceOver.strings b/Rocket.Chat/Resources/en.lproj/VoiceOver.strings index 95c94ada76..9bf46fcf26 100644 --- a/Rocket.Chat/Resources/en.lproj/VoiceOver.strings +++ b/Rocket.Chat/Resources/en.lproj/VoiceOver.strings @@ -27,7 +27,9 @@ "subscriptions.main.userview.label" = "Session information"; "subscriptions.main.userview.value" = "Server: %@. User: %@. Status: %@."; "subscriptions.main.userview.hint" = "Double tap to change status."; -"subscriptions.main.channel.hint" = "Double tap to enter"; +"subscriptions.main.channel.hint" = "Double tap to enter"; +"subscriptions.server_button.hint" = "Double tap to add or change server"; +"subscriptions.server_button.close.hint" = "Double tap to close the server menu"; // MARK: Preferences "preferences.profile.edit.label" = "Profile picture"; diff --git a/Rocket.Chat/Resources/es.lproj/VoiceOver.strings b/Rocket.Chat/Resources/es.lproj/VoiceOver.strings index d6bf232c6d..3f3537b2d4 100644 --- a/Rocket.Chat/Resources/es.lproj/VoiceOver.strings +++ b/Rocket.Chat/Resources/es.lproj/VoiceOver.strings @@ -28,6 +28,8 @@ "subscriptions.main.userview.value" = "Servidor: %@. Usuario: %@. Estado: %@."; "subscriptions.main.userview.hint" = "Toca dos veces para cambiar el estado"; "subscriptions.main.channel.hint" = "Double tap to enter"; // TODO +"subscriptions.server_button.hint" = "Double tap to add or change server"; // TODO +"subscriptions.server_button.close.hint" = "Double tap to close the server menu"; // TODO // MARK: Preferences "preferences.profile.edit.label" = "Profile picture"; // TODO diff --git a/Rocket.Chat/Resources/fr.lproj/VoiceOver.strings b/Rocket.Chat/Resources/fr.lproj/VoiceOver.strings index 9436ebc611..0dabdb32d3 100644 --- a/Rocket.Chat/Resources/fr.lproj/VoiceOver.strings +++ b/Rocket.Chat/Resources/fr.lproj/VoiceOver.strings @@ -28,6 +28,8 @@ "subscriptions.main.userview.value" = "Server: %@. User: %@. Status: %@."; "subscriptions.main.userview.hint" = "Double tap to change status."; "subscriptions.main.channel.hint" = "Double tap to enter"; // TODO +"subscriptions.server_button.hint" = "Double tap to add or change server"; // TODO +"subscriptions.server_button.close.hint" = "Double tap to close the server menu"; // TODO // MARK: Preferences "preferences.profile.edit.label" = "Profile picture"; // TODO diff --git a/Rocket.Chat/Resources/it.lproj/VoiceOver.strings b/Rocket.Chat/Resources/it.lproj/VoiceOver.strings index 2e0d526b00..68e5bf124b 100644 --- a/Rocket.Chat/Resources/it.lproj/VoiceOver.strings +++ b/Rocket.Chat/Resources/it.lproj/VoiceOver.strings @@ -28,6 +28,8 @@ "subscriptions.main.userview.value" = "Server: %@. Utente: %@. Stato: %@."; "subscriptions.main.userview.hint" = "Fare doppio clic per cambiare lo stato."; "subscriptions.main.channel.hint" = "Double tap to enter"; // TODO +"subscriptions.server_button.hint" = "Double tap to add or change server"; // TODO +"subscriptions.server_button.close.hint" = "Double tap to close the server menu"; // TODO // MARK: Preferences "preferences.profile.edit.label" = "Profile picture"; // TODO diff --git a/Rocket.Chat/Resources/ja.lproj/VoiceOver.strings b/Rocket.Chat/Resources/ja.lproj/VoiceOver.strings index b70947585f..2585768b83 100644 --- a/Rocket.Chat/Resources/ja.lproj/VoiceOver.strings +++ b/Rocket.Chat/Resources/ja.lproj/VoiceOver.strings @@ -28,6 +28,8 @@ "subscriptions.main.userview.value" = "サーバー: %@. ユーザー: %@. ステータス: %@."; "subscriptions.main.userview.hint" = "ステータスを変更するにはダブルタップしてください。"; "subscriptions.main.channel.hint" = "Double tap to enter"; // TODO +"subscriptions.server_button.hint" = "Double tap to add or change server"; // TODO +"subscriptions.server_button.close.hint" = "Double tap to close the server menu"; // TODO // MARK: Preferences "preferences.profile.edit.label" = "Profile picture"; // TODO diff --git a/Rocket.Chat/Resources/pl.lproj/VoiceOver.strings b/Rocket.Chat/Resources/pl.lproj/VoiceOver.strings index af140a3598..c7acda200c 100644 --- a/Rocket.Chat/Resources/pl.lproj/VoiceOver.strings +++ b/Rocket.Chat/Resources/pl.lproj/VoiceOver.strings @@ -28,6 +28,8 @@ "subscriptions.main.userview.value" = "Serwer: %@. Użytkownik: %@. Status: %@."; "subscriptions.main.userview.hint" = "Dotknij dwukrotnie aby zmienić status."; "subscriptions.main.channel.hint" = "Double tap to enter"; // TODO +"subscriptions.server_button.hint" = "Double tap to add or change server"; // TODO +"subscriptions.server_button.close.hint" = "Double tap to close the server menu"; // TODO // MARK: Preferences "preferences.profile.edit.label" = "Profile picture"; // TODO diff --git a/Rocket.Chat/Resources/pt-BR.lproj/VoiceOver.strings b/Rocket.Chat/Resources/pt-BR.lproj/VoiceOver.strings index 7d80745784..8cb8744169 100644 --- a/Rocket.Chat/Resources/pt-BR.lproj/VoiceOver.strings +++ b/Rocket.Chat/Resources/pt-BR.lproj/VoiceOver.strings @@ -28,6 +28,8 @@ "subscriptions.main.userview.value" = "Servidor: %@. Usuário: %@. Status: %@."; "subscriptions.main.userview.hint" = "Toque duplo para mudar o status."; "subscriptions.main.channel.hint" = "Double tap to enter"; // TODO +"subscriptions.server_button.hint" = "Double tap to add or change server"; // TODO +"subscriptions.server_button.close.hint" = "Double tap to close the server menu"; // TODO // MARK: Preferences "preferences.profile.edit.label" = "Profile picture"; // TODO diff --git a/Rocket.Chat/Resources/pt-PT.lproj/VoiceOver.strings b/Rocket.Chat/Resources/pt-PT.lproj/VoiceOver.strings index 7d80745784..8cb8744169 100644 --- a/Rocket.Chat/Resources/pt-PT.lproj/VoiceOver.strings +++ b/Rocket.Chat/Resources/pt-PT.lproj/VoiceOver.strings @@ -28,6 +28,8 @@ "subscriptions.main.userview.value" = "Servidor: %@. Usuário: %@. Status: %@."; "subscriptions.main.userview.hint" = "Toque duplo para mudar o status."; "subscriptions.main.channel.hint" = "Double tap to enter"; // TODO +"subscriptions.server_button.hint" = "Double tap to add or change server"; // TODO +"subscriptions.server_button.close.hint" = "Double tap to close the server menu"; // TODO // MARK: Preferences "preferences.profile.edit.label" = "Profile picture"; // TODO diff --git a/Rocket.Chat/Resources/ru.lproj/VoiceOver.strings b/Rocket.Chat/Resources/ru.lproj/VoiceOver.strings index 486b7d80dd..dca7592fb8 100644 --- a/Rocket.Chat/Resources/ru.lproj/VoiceOver.strings +++ b/Rocket.Chat/Resources/ru.lproj/VoiceOver.strings @@ -28,6 +28,8 @@ "subscriptions.main.userview.value" = "Сервер: %@. Пользователь: %@. Статус: %@."; "subscriptions.main.userview.hint" = "Дважды нажмите, чтобы изменить статус."; "subscriptions.main.channel.hint" = "Double tap to enter"; // TODO +"subscriptions.server_button.hint" = "Double tap to add or change server"; // TODO +"subscriptions.server_button.close.hint" = "Double tap to close the server menu"; // TODO // MARK: Preferences "preferences.profile.edit.label" = "Profile picture"; // TODO diff --git a/Rocket.Chat/Resources/zh-Hans.lproj/VoiceOver.strings b/Rocket.Chat/Resources/zh-Hans.lproj/VoiceOver.strings index e7a8661ac5..1c2b8c17ee 100644 --- a/Rocket.Chat/Resources/zh-Hans.lproj/VoiceOver.strings +++ b/Rocket.Chat/Resources/zh-Hans.lproj/VoiceOver.strings @@ -28,6 +28,8 @@ "subscriptions.main.userview.value" = "服务器: %@. 用户: %@. 状态: %@."; "subscriptions.main.userview.hint" = "双击变更状态"; "subscriptions.main.channel.hint" = "Double tap to enter"; // TODO +"subscriptions.server_button.hint" = "Double tap to add or change server"; // TODO +"subscriptions.server_button.close.hint" = "Double tap to close the server menu"; // TODO // MARK: Preferences "preferences.profile.edit.label" = "Profile picture"; // TODO diff --git a/Rocket.Chat/Resources/zh-Hant.lproj/VoiceOver.strings b/Rocket.Chat/Resources/zh-Hant.lproj/VoiceOver.strings index fd93a1cc8a..bff31f4fd7 100644 --- a/Rocket.Chat/Resources/zh-Hant.lproj/VoiceOver.strings +++ b/Rocket.Chat/Resources/zh-Hant.lproj/VoiceOver.strings @@ -28,6 +28,8 @@ "subscriptions.main.userview.value" = "伺服器: %@. 訊息: %@. 狀態: %@."; "subscriptions.main.userview.hint" = "點擊兩下變更狀態"; "subscriptions.main.channel.hint" = "Double tap to enter"; // TODO +"subscriptions.server_button.hint" = "Double tap to add or change server"; // TODO +"subscriptions.server_button.close.hint" = "Double tap to close the server menu"; // TODO // MARK: Preferences "preferences.profile.edit.label" = "Profile picture"; // TODO diff --git a/Rocket.Chat/Views/Subscriptions/ServersListView.swift b/Rocket.Chat/Views/Subscriptions/ServersListView.swift index 9e903cebc2..d8babac737 100644 --- a/Rocket.Chat/Views/Subscriptions/ServersListView.swift +++ b/Rocket.Chat/Views/Subscriptions/ServersListView.swift @@ -21,6 +21,7 @@ final class ServersListView: UIView { @IBOutlet weak var labelTitle: UILabel! { didSet { labelTitle.text = viewModel.title + labelTitle.accessibilityTraits = .header } } @@ -80,6 +81,7 @@ final class ServersListView: UIView { DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) { instance.headerViewTopConstraint.constant = 0 + UIAccessibility.post(notification: .screenChanged, argument: self) instance.animates({ instance.backgroundColor = UIColor.black.withAlphaComponent(0.4) diff --git a/Rocket.Chat/Views/Subscriptions/SubscriptionsTitleView.swift b/Rocket.Chat/Views/Subscriptions/SubscriptionsTitleView.swift index 1d0bc46ea8..05955f1490 100644 --- a/Rocket.Chat/Views/Subscriptions/SubscriptionsTitleView.swift +++ b/Rocket.Chat/Views/Subscriptions/SubscriptionsTitleView.swift @@ -30,6 +30,9 @@ final class SubscriptionsTitleView: UIView { buttonServer.semanticContentAttribute = .forceRightToLeft buttonServer.layer.cornerRadius = 5 buttonServer.layer.masksToBounds = true + + buttonServer.isAccessibilityElement = true + buttonServer.accessibilityTraits = .button } } @@ -47,8 +50,10 @@ final class SubscriptionsTitleView: UIView { if reverse, let cgImage = image.cgImage { let rotatedImage = UIImage(cgImage: cgImage, scale: image.scale, orientation: .downMirrored) buttonServer.setImage(rotatedImage, for: .normal) + buttonServer.accessibilityHint = VOLocalizedString("subscriptions.server_button.close.hint") } else { buttonServer.setImage(image, for: .normal) + buttonServer.accessibilityHint = VOLocalizedString("subscriptions.server_button.hint") } } }