Răsfoiți Sursa

voice-recording hint for voice over

B. Petersen 5 ani în urmă
părinte
comite
76bac0e700

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

@@ -150,6 +150,13 @@ class AudioRecorderController: UIViewController, AVAudioRecorderDelegate {
         validateMicrophoneAccess()
     }
 
+    override func viewDidAppear(_ animated: Bool) {
+        super.viewDidAppear(animated)
+        if UIAccessibility.isVoiceOverRunning {
+            UIAccessibility.post(notification: .layoutChanged, argument: self.doneButton)
+        }
+     }
+
     override func viewWillDisappear(_ animated: Bool) {
         super.viewWillDisappear(animated)
 

+ 2 - 0
deltachat-ios/Controller/ChatViewController.swift

@@ -1094,6 +1094,8 @@ extension ChatViewController: MessagesLayoutDelegate {
         let cameraAction = PhotoPickerAlertAction(title: String.localized("camera"), style: .default, handler: cameraButtonPressed(_:))
         let documentAction = UIAlertAction(title: String.localized("documents"), style: .default, handler: documentActionPressed(_:))
         let voiceMessageAction = UIAlertAction(title: String.localized("voice_message"), style: .default, handler: voiceMessageButtonPressed(_:))
+        voiceMessageAction.accessibilityLabel = String.localized("voice_message")
+        voiceMessageAction.accessibilityHint = String.localized("a11y_voice_message_hint_ios")
         let isLocationStreaming = dcContext.isSendingLocationsToChat(chatId: chatId)
         let locationStreamingAction = UIAlertAction(title: isLocationStreaming ? String.localized("stop_sharing_location") : String.localized("location"),
                                                     style: isLocationStreaming ? .destructive : .default,

+ 1 - 0
deltachat-ios/en.lproj/Localizable.strings

@@ -649,3 +649,4 @@
 "import_contacts" = "Import device contacts";
 "import_contacts_message" = "To chat with contacts from your device open Settings and enable Contacts.";
 "stop_sharing_location" = "Stop sharing location";
+"a11y_voice_message_hint_ios" = "After recording double-tap to send. Or scrub left-right with two fingers to discard the recording.";

+ 1 - 0
tools/untranslated.xml

@@ -5,4 +5,5 @@
     <string name="import_contacts">Import device contacts</string>
     <string name="import_contacts_message">To chat with contacts from your device open Settings and enable Contacts.</string>
     <string name="stop_sharing_location">Stop sharing location</string>
+    <string name="a11y_voice_message_hint_ios">After recording double-tap to send. Or scrub left-right with two fingers to discard the recording.</string>
 </resources>