Cell shifts under VoiceOver when accessibility APIs are overridden

Number:rdar://15495675 Date Originated:11/18/2013
Status:Closed Resolved:Insufficient information
Product:iOS SDK Product Version:7.0
Classification:UI/Usability Reproducible:Always
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.

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.

Happens on iPod touch and iPhone with VoiceOver turned on.

iOS 7.0.*. I've heard it may also happen on iOS 6, but don't have a device running 6 to test it on.

Additional Notes:
accessible items, the content view of each cell scrolls over 30 points to the left when you swipe.

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?


Closed by Apple

Apple contacted me on 1/8/2014 to test this against a beta version of 7.1.

When I did not reply by 1/22/2014, they closed it as Insufficient information, saying they believed it was fixed.

When I just tested it on 6/5/2014, it was still not fixed, so I have filed another bug, rdar://17171309 Open Radar: http://openradar.appspot.com/radar?id=4988157971922944

By apontious at June 5, 2014, 7:23 a.m. (reply...)

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!