UIAccessibilityElement not exposed for iOS 13.4+

We’ve ran into an interesting issue in which iOS 13.4+ no longer exposes accessibility names / values to Appium through the use of UIAccessibilityElements.

In our specific case with iOS, we currently have a custom UICollectionViewCell with an overridden accessibilityElements property that returns only UIAccessibilityElements. When running on iOS 13.3, using either Appium 1.17.1 or 1.18.2 (desktop clients on mac), we are able to see the accessibility labels and values within the UICollectionViewCell. But the accessibility information is completely missing on iOS 13.4+. We also checked in accessibility inspector from XCode 12, and the accessibility was returned correctly for the UIAccessibilityElements, and available in Voice Over.

Any idea what’s going on? Here are screenshots of the issue. The first image is on iOS 13.3, where the button within the UICollectionViewCell is exposed properly with the accessibility label as “Start a conversation”. The “Start a conversation” text is an accessibility label assigned to the UIAccessibilityElement, where its frame is the same as the actual UIButton.

Now on iOS 13.4, the same button within the UICollectionViewCell no longer has the accessibility label. Instead, it just shows the default image name (“icon toolbar add”).

Did you try get page source with latest 1.19.beta appium?