Browse Source

set accessibilityViewModal for AudioRecorderController, wakeup voiceOver after returning

cyberta 3 years ago
parent
commit
955aafc9c8

+ 1 - 0
deltachat-ios/Chat/ChatViewController.swift

@@ -1923,6 +1923,7 @@ extension ChatViewController: MediaPickerDelegate {
 
     func onVoiceMessageRecorderClosed() {
         if UIAccessibility.isVoiceOverRunning {
+            UIAccessibility.post(notification: .announcement, argument: nil)
             // we need to wait a little bit, otherwise the  UIAccessibility notification is ignored and
             // the first accessibility element on the screen gets selected
             DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { [weak self] in

+ 1 - 0
deltachat-ios/Controller/AudioRecorderController.swift

@@ -106,6 +106,7 @@ class AudioRecorderController: UIViewController, AVAudioRecorderDelegate {
     
     override func viewDidLoad() {
         super.viewDidLoad()
+        self.accessibilityViewIsModal = true
         self.view.backgroundColor = UIColor.themeColor(light: .white, dark: .black)
         self.navigationController?.isToolbarHidden = false
         self.navigationController?.toolbar.isTranslucent = true