iOS Accessibility - Direct Interaction for Keyboards in accessibility mode

Hello all,

I am creating an app with the accessibility mode support for an iPad device. I have a requirement where user needs to switch to a particular view and the user is allowed to draw in that area as well as pass keyboard key inputs to the view.

When VoiceOver is on, all the touch and keyboard inputs are being captured by Accessibility engine and these events are not received in the app. As per my requirement I need to capture the keyboard key inputs as well as touch events for the view. For receiving the touch inputs directly in the app I am using “UIAccessibilityTraitAllowsDirectInteraction” and it works fine, but the keyboard doesn’t.

My query is : is there anything available like “UIAccessibilityTraitAllowsDirectInteraction” for keyboards in accessibility/ VoiceOver mode? Or is there a way if I can disable the accessibility/ VoiceOver for a particular view in a ViewController when the accessibility mode is on for the iPad device?
 Any help would be appreciated!

Answered by Engineer in 748860022

There's nothing you can do to change the way VoiceOver processes keyboard events. I assume you're asking about a hardware keyboard here? VoiceOver shouldn't be stealing keyboard input from the app, with the exception of VO commands that are performed while holding down the VO modifier keys.

It's possible you might have quick nav on, which will process single letter inputs as VoiceOver commands. Check out this document to learn more about quick nav and how to turn it on or off: https://support.apple.com/guide/voiceover/with-quick-nav-vo27943/mac

If quick nav is off and you are still not seeing your app get keyboard input, could you elaborate on what type of keyboard input you are trying to get in your app?

Hello, I have a few clarifying questions that will help me understand your issue and offer the proper guidance.

Are you talking about hardware keyboard inputs, and not inputs from the software keyboard UI? Which inputs specifically are you trying to capture and what happens when you perform them on the keyboard? Feel free to upload images or screenshots of your UI or any code examples if it helps illustrate your problem statement. Thanks!

Accepted Answer

There's nothing you can do to change the way VoiceOver processes keyboard events. I assume you're asking about a hardware keyboard here? VoiceOver shouldn't be stealing keyboard input from the app, with the exception of VO commands that are performed while holding down the VO modifier keys.

It's possible you might have quick nav on, which will process single letter inputs as VoiceOver commands. Check out this document to learn more about quick nav and how to turn it on or off: https://support.apple.com/guide/voiceover/with-quick-nav-vo27943/mac

If quick nav is off and you are still not seeing your app get keyboard input, could you elaborate on what type of keyboard input you are trying to get in your app?

iOS Accessibility - Direct Interaction for Keyboards in accessibility mode
 
 
Q