ipadaccessibilityvoiceover

Prevent VoiceOver to focus elements covered by modal when swipe navigating on iPad


When you use iPad and VoiceOver you navigate the web by swiping with your fingers on the screen. VoiceOver focuses the elements that you touch.

The problem is that I've set a fixed modal that sits on top of the entire page, with a white background color and position fixed, but if I swipe I'm still able to focus elements that are behind the modal. How do I prevent this behavior?


Solution

  • How do I prevent this behavior?

    The best way to avoid VoiceOver checking other elements than those in the foreground is using the accessibilityViewIsModal property of your modal view.

    I suggest to: