Jaditpol
Jaditpol

Reputation: 483

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?

Upvotes: 4

Views: 1376

Answers (1)

XLE_22
XLE_22

Reputation: 5671

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:

  • Watch this WWDC excerpt to find out the proper implementation.
  • Take a look at this site where useful examples are provided with helpful illustrations.

Upvotes: 3

Related Questions