Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 663
Jason Avatar asked Oct 18 '25 16:10

Jason


1 Answers

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

like image 169
Jason Avatar answered Oct 20 '25 08:10

Jason