Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 891
Jaditpol Avatar asked Nov 15 '25 08:11

Jaditpol


1 Answers

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.
like image 160
XLE_22 Avatar answered Nov 18 '25 21:11

XLE_22