I am having some problems with the Accessibility Module on iOS. Specifically, I am using the module to create an Accessibility Hierarchy for the screen readers on mobile devices.
I set up my accessibility hierarchy with full screen headers for each screen of the app.
Each header has nested buttons and text that are accessibility node targets.
My code for generating the hierarchy structure is based off of the Unity sample project:
On Android this all works correctly. I have can tap anywhere on a screen and Talkback reads the header too me. I can tap on any button or text and have it read to me as well. Double tapping on buttons triggers the buttons, and the whole thing just works as expected. I can even use the 3 finger gesture to scroll in scrollable or draggable areas.
On iOS, with VoiceOver, it’s a completely different situation. First of all, tapping anywhere on the screen only ever reads me the header. I thought maybe the header was just blocking all the child components, but if I swipe to move to the next level of the hierarchy it often doesn’t work. When it does work, it usually only reaches the second node before reverting to the beginning. Doing the two finger swipe to read the whole screen similarly only reads the header. I also can’t scroll or drag any of the scroll or drag areas.
The weird part is I found allowsDirectInteraction
This is for iOS specifically, so I thought this could be the difference. If I enable this, it makes more of the screen components readable via the swiping gestures (but only those childed to the first parent in the hierarchy). Of course then I can’t tap to get anything read either, because anything labelled direct interaction just gets interacted with normally instead. I think I need this for my dragable areas, but again that doesn’t really solve my problem or explain any of the behaviour.
I would really like to get this working since I have already gotten it working for Android. As a back up I figure I could use Apple.Accesibility:
But that seems like it’s own can of worms I’d like to avoid opening if possible.
Does anyone have any ideas or experience implementing this on iOS? Is there some key difference between iOS and Android I am missing? Any help or pointers would be much appreciated.
Thanks in advance for your help!
Unity Version 6000.0.25f1. iOS 18.5.