|
@@ -1094,8 +1094,6 @@ 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,
|
|
@@ -1109,7 +1107,15 @@ extension ChatViewController: MessagesLayoutDelegate {
|
|
|
alert.addAction(locationStreamingAction)
|
|
|
}
|
|
|
alert.addAction(UIAlertAction(title: String.localized("cancel"), style: .cancel, handler: nil))
|
|
|
- self.present(alert, animated: true, completion: nil)
|
|
|
+ self.present(alert, animated: true, completion: {
|
|
|
+ // unfortunately, voiceMessageAction.accessibilityHint does not work,
|
|
|
+ // but this hack does the trick
|
|
|
+ if UIAccessibility.isVoiceOverRunning {
|
|
|
+ if let view = voiceMessageAction.value(forKey: "__representer") as? UIView {
|
|
|
+ view.accessibilityHint = String.localized("a11y_voice_message_hint_ios")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
private func documentActionPressed(_ action: UIAlertAction) {
|