summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2021-07-09 18:02:00 +0200
committerAndrej Mihajlov <and@mullvad.net>2021-07-16 13:43:36 +0200
commit6046e586b5305c1c7c0edb04330fa4b595e988ba (patch)
treee7a34108accaaadd64bb847caef1decdb08eef42
parent3d31a48cae5f02495f85bfa94dfaf435d4318609 (diff)
downloadmullvadvpn-6046e586b5305c1c7c0edb04330fa4b595e988ba.tar.xz
mullvadvpn-6046e586b5305c1c7c0edb04330fa4b595e988ba.zip
Accessibility: ignore siblings when problem report text view is expanded
-rw-r--r--ios/MullvadVPN/ProblemReportViewController.swift9
1 files changed, 9 insertions, 0 deletions
diff --git a/ios/MullvadVPN/ProblemReportViewController.swift b/ios/MullvadVPN/ProblemReportViewController.swift
index 157597d028..c610c03c34 100644
--- a/ios/MullvadVPN/ProblemReportViewController.swift
+++ b/ios/MullvadVPN/ProblemReportViewController.swift
@@ -351,6 +351,9 @@ class ProblemReportViewController: UIViewController, UITextFieldDelegate, Condit
}
private func setDescriptionFieldExpanded(_ isExpanded: Bool) {
+ // Make voice over ignore siblings when expanded
+ self.messageTextView.accessibilityViewIsModal = isExpanded
+
if isExpanded {
// Disable the large title
self.navigationItem.largeTitleDisplayMode = .never
@@ -381,6 +384,9 @@ class ProblemReportViewController: UIViewController, UITextFieldDelegate, Condit
self.isMessageTextViewExpanded = true
self.textViewKeyboardResponder?.updateContentInsets()
+
+ // Tell accessibility engine to scan the new layout
+ UIAccessibility.post(notification: .layoutChanged, argument: nil)
}
} else {
@@ -405,6 +411,9 @@ class ProblemReportViewController: UIViewController, UITextFieldDelegate, Condit
self.textFieldsHolder.addSubview(self.messageTextView)
self.isMessageTextViewExpanded = false
+
+ // Tell accessibility engine to scan the new layout
+ UIAccessibility.post(notification: .layoutChanged, argument: nil)
}
}
}