diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2021-06-22 09:26:02 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2021-07-16 13:42:44 +0200 |
| commit | 0711fb17f38e7345c48ac21cb9b5241d1db79156 (patch) | |
| tree | 32cbc5ddb167e63d8134fdc1d8e9e1cd866f1811 | |
| parent | 08e08a07afe91491351340ce71cbe33b2918b3d9 (diff) | |
| download | mullvadvpn-0711fb17f38e7345c48ac21cb9b5241d1db79156.tar.xz mullvadvpn-0711fb17f38e7345c48ac21cb9b5241d1db79156.zip | |
Root: update accessibilityElements and post .screenChanged
| -rw-r--r-- | ios/MullvadVPN/RootContainerViewController.swift | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ios/MullvadVPN/RootContainerViewController.swift b/ios/MullvadVPN/RootContainerViewController.swift index 7aaadddc56..0364b411c8 100644 --- a/ios/MullvadVPN/RootContainerViewController.swift +++ b/ios/MullvadVPN/RootContainerViewController.swift @@ -107,8 +107,6 @@ class RootContainerViewController: UIViewController { addTransitionView() addHeaderBarView() updateHeaderBarBackground() - - accessibilityElements = [headerBarView, transitionContainer] } override func viewDidLayoutSubviews() { @@ -361,6 +359,7 @@ class RootContainerViewController: UIViewController { } self.updateInterfaceOrientation(attemptRotateToDeviceOrientation: true) + self.updateAccessibilityElementsAndNotifyScreenChange() completion?() } @@ -552,6 +551,14 @@ class RootContainerViewController: UIViewController { } } + private func updateAccessibilityElementsAndNotifyScreenChange() { + // Update accessibility elements to define the correct navigation order: header bar, content view. + view.accessibilityElements = [headerBarView, topViewController?.view].compactMap { $0 } + + // Tell accessibility that the significant part of screen was changed. + UIAccessibility.post(notification: .screenChanged, argument: nil) + } + } class RootContainerPushSegue: UIStoryboardSegue { |
