REOPENED Cell shifts under VoiceOver when accessibility APIs are overridden

Originator:apontious
Number:rdar://17171309 Date Originated:6/5/2014
Status:Closed Resolved:
Product:iOS SDK Product Version:7.1.1
Classification:UI/Usability Reproducible:Always
 
Summary:
If you subclass UITableViewCell and override the accessibility APIs, accessibilityElementCount, accessibilityElementAtIndex:, and indexOfAccessibilityElement:, and have cell contents that extend into the rightward 30 point of the content view, and then turn VoiceOver on and swipe through the accessible items, the content view of each cell scrolls over 30 points to the left when you swipe.

REOPENED from rdar://15495675, closed back in 1/2014 when I did not reply to request to test beta.

This STILL OCCURS on iOS 7.1.1 running on an iPhone 5.

Steps to Reproduce:
- Clone https://github.com/apontious/VoiceOver-UITableViewCell-Bug.git
- Build and run project "1. VoiceOver Problem" on an iPhone or iPod touch with VoiceOver turned on.
- Note that for custom MyCell class, accessibility APIs accessibilityElementCount, accessibilityElementAtIndex:, and indexOfAccessibilityElement: have been overridden.
- Double-tap the + button a few times to create a few table cells
- Swipe to the right to navigate through the contents of the cells

Expected Results:
UI stays stationary, only VoiceOver selection changes.

Actual Results:
The entire content view of the cell is scrolled over 30 points to the left.

Version:
iOS 7.1.1

Notes:
The additional project "2. Hack Solution" shows that this can be hacked to work by overriding the cell's scrollViewDidScroll: and setting the scroll view's scrollOffset back to 0, 0. This works because UITableViewCell is the delegate for its parent scroll view class.

Project "3. Resize Solution" shows that the problem doesn't occur if no contents extend into the last rightward 30 points of the cell's content view.

Project "4. No Accessibility APIs Solution" shows that if you *don't* override the accessibility APIs, this also doesn't happen. Weird, eh?

Configuration:
iPhone 5


9/27/2014: I tested it on iOS 8.0 with an iPod touch 5th gen, and it seems to work.

Attempted to indicate "Resolved" in Bug Reporter UI, pretty sure I wasn't successful, but I will list it as Closed here on Open Radar anyway.

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!