I'm adding accessibility to my iOS app. I'm seeing a specific situation that when I tap on a UIView that has isAccessibilityElement = false
, and all of its ancestor views are also isAccessibilityElement = false
, VoiceOver will speak the text from this view's sibling - a different child of this view's parent. And in Accessibility Inspector, when I hover over this view, the sibling lights up.
I don't understand how some view that's not in the hierarchy of the one I'm tapping on could be used for VoiceOver text. I don't see any behavior like this documented for iOS 11. How could this be happening?
Edit: I've created a simple project with a UITableView, containing UITableViewCell objects, each of which contains a UILabel. Tapping on a UITableViewCell (outside the UILabel) will read the UILabel within it. How do I disable that behavior, so that only tapping on the label itself, not on its containing UITableViewCell, will read the label?