Accessibility: Posting UIAccessibilityScreenChangedNotification doesn't work on app launch

Originator:dieter.komendera
Number:rdar://21119827 Date Originated:27-May-2015 12:16 PM
Status:Open Resolved:
Product:iOS SDK Product Version:8.3.1
Classification:Serious Bug Reproducible:Always
 
Summary:
When trying to set the initial accessibility item after the app launches per UIAccessibilityPostNotification, the item is not selected. Instead the first accessibility item in the hierarchy is selected.

In the view controller which is visible after launching:

	override func viewDidAppear(animated: Bool) {
		super.viewDidAppear(animated)
		UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, self.myButton)
	}

This is how it is documented in “Moving the VoiceOver Cursor to a Specific Element“ Listing 9-1:
https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/Accessibility/AccessibilityfromtheViewControllersPerspective.html#//apple_ref/doc/uid/TP40007457-CH2-SW1

Steps to Reproduce:
* Enable VoiceOver
* Launch the sample app attached

Expected Results:
* Button in the center selected and read aloud

Actual Results:
* Title in the navigation bar selected and read aloud

Regression:

Notes:
It works as expected when the controller is displayed from another view controller.

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!