Question

I'm having some challenges with VoiceOver support in my app and I find it really hard to debug.

I have a table view where each cell is an element that can be read by VoiceOver. It works fine when I tap each element. Its summary is read aloud. When I use the Two-finger swipe down gesture as described here, it should cycle through all the cells in my table view all the way to the bottom, reading everything aloud. The thing is, it starts reading and goes through the cells as expected, but then suddenly stops. I can see the VoiceOver cursor moves and it even moves to the next cell, but then doesn't read it.

I have tried to subclass UITableView and implement the UIAccessibilityContainer methods, but that didn't improve things.

I have different types of cells in my view and I suspect one of the cell types may cause this, as it seem to stop after this cell type when it stops, but it always moves the cursor to the next cell and it doesn't always stop after this cell type.

I'd be happy to provide some code, but at this point I'm not sure what to provide exactly. :)

I have no idea how to debug stuff like this, because I don't seem to get any callbacks when this gesture is invoked. Even though you can't answer the question, any tips on how to debug VoiceOver issues like this is highly appreciated.

Was it helpful?

Solution

I solved the problem although I don't understand it fully.

The progression stopped, not after a certain cell type but after a scroll. In most cells I relied on an implicit accessiblityLabel so I didn't specify the labels directly.

In trying to solve the issue, I changed my cells so they all override the accessibilityLabel property and specifically return a label. That made it work.

I suspect that it was caused by some sort of timing issue where a newly loaded cell didn't have its data loaded fully before being asked of its accessibility label.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top