robinkunde
robinkunde

Reputation: 1000

iOS Voiceover reads from covered UIWindow

I have the following setup:

Problem:

When voiceover is enabled and I touch an area in window 1 that doesn't have an element that can be interacted with, but where window 0 does have such an element, it will select and read the element in window 0, even though window 0 is not visible at all.

Is there something I'm missing?

Upvotes: 5

Views: 1134

Answers (1)

robinkunde
robinkunde

Reputation: 1000

Turns out there are 2 ways to fix this:

  1. Set accessibilityElementsHidden to true on window 0. Not ideal because it has to be restored when window 1 goes away.
  2. Set accessibilityViewIsModal to true on window 1. All windows are siblings so this will ignore window 0 for accessibility purposes. I don't think this affects special windows like the status bar and keyboard. This is likely the best solution.

Upvotes: 7

Related Questions