I have two questions regarding accessibility and UICollectionViews that I'm hoping to get some expert help with. The other question, regarding Voice Over read order, is here. I've created a sample project demonstrating both issues.
I have a UICollectionView
where I'm providing custom section headers. These section headers are accessibility elements and have the accessibility trait UIAccessibilityTraitHeader
set. When Voice Over is enabled, and the user is swiping horizontally through the collection, the header is announced properly, and it is even declared as a header. However, if the user swipes up or down to the next header, Voice Over will only jump to another header if it is visible. I'm assuming this is because when a view isn't visible in a collection view, it's removed from the view hierarchy and Voice Over no longer knows it exists.
You can pull this example project, run it, enable voice over, and use the dial to set the swipe up/down to headings to view the issue.
Is there a way I can allow the user to jump to a header that is not currently visible? Any help would be greatly appreciated.