accessibilityFrame is always CGRectZero

Originator:simonracz
Number:rdar://33133333 Date Originated:05.07.2017
Status:open Resolved:
Product:iOS Product Version:10.3
Classification: Reproducible:always
 
According to the docs a UIView's accessibilityFrame is equivalent the view's frame by default. See https://developer.apple.com/documentation/objectivec/nsobject/1615111-accessibilityframe

Contrary to that, on iOS 10.3.2 and 10.3.3 the accessibiltyFrame is always CGRectZero.

If you turn on VoiceOver in the settings on the device, then suddenly the accessibilityFrame's are correct (non-zero) again.

This regression has big implications, e.g. breaking testing frameworks like EarlGrey.

Steps to Reproduce:
@IBAction func buttonClicked(_ sender: UIButton) {
  NSLog("frame: %@", NSStringFromCGRect(sender.frame));
  NSLog("accessibilityFrame: %@", NSStringFromCGRect(sender.accessibilityFrame));
}

Expected Results:
frame: {{x, y}, {z, w}}
accessibilityFrame: {{x, y}, {z, w}}

Observed Results:
frame: {{x, y}, {z, w}}
accessibilityFrame: {{0, 0}, {0, 0}}

Version:
10.3.2, 10.3.3 are surely affected, don't have access to others.

Notes:


Configuration:
Turning on/off VoiceOver affects it. But it shouldn't according to the documentation.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!