VoiceOver incorrectly focuses the first cell in a collection view even when the collection view's isAccessibilityElement is YES

Originator:jszumski
Number:rdar://20419462 Date Originated:03-Apr-2015 03:39 PM
Status:Open Resolved:
Product:iOS Product Version:8.0
Classification:Other Bug Reproducible:Always
 
Summary:
I have a collection view that I want to be an accessibility element with the adjustable trait.  Its accessibilityLabel is intended to give a VoiceOver user some additional context and be suffixed with the accessibilityLabel of the centered cell.  Unfortunately it seems that this setup is impossible because the VoiceOver automatically focuses the first cell in the collection view regardless of how it answers to the UIAccessibilityContainer methods.

Note that the collection view should be an accessibility element and not a container because of this line:

	self.collectionView.isAccessibilityElement = YES;

Steps to Reproduce:
1. Open the attached VoiceOver Focus Cells project
2. Turn on VoiceOver on the device
3. Build and run on the device
4. Swipe right to focus the "Collection view" row
5. Double tap to select the row
6. Swipe right to move the focus from the back button to the collection view itself
7. Observe that VoiceOver focuses the first cell and speaks "Custom accessibility label for cell number 0"

Expected Results:
VoiceOver should read "Collection view accessiblity label".

Actual Results:
VoiceOver reads "Custom accessibility label for cell number 0".

Version:
iOS 8.0.2 (12A405)

Notes:
The attached sample project also has the same scenario for a table view, which does behave as expected.  

1. Open the attached VoiceOver Focus Cells project
2. Turn on VoiceOver on the device
3. Build and run on the device
4. Swipe right twice to focus the "Table view" row
5. Double tap to select the row
6. Swipe right to move the focus from the back button to the table view itself
7. Observe that VoiceOver focuses the entire table and speaks "Table view accessibility label"

Configuration:
iPhone 5c AT&T

Comments

Sample project: https://github.com/jszumski/collection-view-voice-over-focus


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!