Skip to content
This repository was archived by the owner on Jun 7, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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)
}
}
Expand Down Expand Up @@ -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() {
Expand Down
3 changes: 2 additions & 1 deletion Rocket.Chat/Resources/cs.lproj/VoiceOver.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Rocket.Chat/Resources/de.lproj/VoiceOver.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Rocket.Chat/Resources/el.lproj/VoiceOver.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion Rocket.Chat/Resources/en.lproj/VoiceOver.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 2 additions & 0 deletions Rocket.Chat/Resources/es.lproj/VoiceOver.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Rocket.Chat/Resources/fr.lproj/VoiceOver.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Rocket.Chat/Resources/it.lproj/VoiceOver.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Rocket.Chat/Resources/ja.lproj/VoiceOver.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Rocket.Chat/Resources/pl.lproj/VoiceOver.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Rocket.Chat/Resources/pt-BR.lproj/VoiceOver.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Rocket.Chat/Resources/pt-PT.lproj/VoiceOver.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Rocket.Chat/Resources/ru.lproj/VoiceOver.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Rocket.Chat/Resources/zh-Hans.lproj/VoiceOver.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Rocket.Chat/Resources/zh-Hant.lproj/VoiceOver.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Rocket.Chat/Views/Subscriptions/ServersListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ final class ServersListView: UIView {
@IBOutlet weak var labelTitle: UILabel! {
didSet {
labelTitle.text = viewModel.title
labelTitle.accessibilityTraits = .header
}
}

Expand Down Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions Rocket.Chat/Views/Subscriptions/SubscriptionsTitleView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand All @@ -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")
}
}
}
Expand Down