Jason
Jason

Reputation: 826

XCUIElement isAccessibilityElement returning as false even though the element is reported as Is Accessibility Element in View Hierarchy

There's an XCUIElement my automated test is validating accessibility on but isAccessibilityElement is returning false. I checked the storyboard file and Accessibility has the checkbox marked. I checked the View Hierarchy as I was debugging the app and it is also reporting accessibility as enabled. All of the containing views in the tree going back to the view controller have accessibility disabled. What could cause this discrepancy between what is returned in the code and what is actually true in the app?

enter image description here enter image description here enter image description here enter image description here


Update: A screenshot of Apple's response to the feedback

enter image description here

Upvotes: 4

Views: 1427

Answers (1)

Jason
Jason

Reputation: 826

I've filed an Apple Feedback request for this issue and will update this answer if I receive a reply

Edit - Apple was kind enough to tell me that this "works as expected" with no further explanation

Upvotes: 2

Related Questions