I'd like to have my QR code scanning app inform the user when it finds a QR code. For sighted users, this works using a label at the bottom that updates to notify the user. However, a blind user would have to tap on that label again to have it read by Voice Over. I would much prefer it to just read automatically.
The closest I can find to this question is UIAccessibility - Read all the labels and buttons on the screen from top to down, which wasn't possible. While this doesn't bode well for my app, that was a year ago. Has Apple updated it's UIAccessibility protocol in any way to allow this?
As a last resort I suppose I could play my own mp3 recording if VoiceOver is on.
You can make VoiceOver speak any string any time you want by calling:
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, NSLocalizedString("QR code has been detected", comment: ""))
Swift 4
UIAccessibility.post(notification: .announcement, argument: "Text")
There is no direct way to tell VoiceOver to speak updates of an element that VoiceOver cursor is not on. This (i.e. speaking the same content "manually") is a feasible workaround.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With