For various reasons, I have to use AVSpeechSynthesizer in SwiftUI to read text for visually impaired users. How can I prevent VoiceOver from reading the text in the Text view, without making it invisible to Accessibility?
Ideally I'd like to define custom gestures on the same Text view for stopping and continuing text reading, jumping to previous/next sentence, to previous/next paragraph, etc. These will control the AVSpeechSynthesizer I'm using.
I've tried using .accessibility(hidden: true)
but that makes the view not accessible and a .accessibilityAction(.magicTap)
set on the ScrollView with the Text view never gets triggered. Instead a magicTap starts playing music from presumably the Music app.