I have a UITableView
that displays a list of items, with a subclass of UITableViewCell
. In that cell, I have a hierarchy of UILabel
s and subviews like so:
UITableViewCell subclass
- UILabel a
- UILabel b
- UILabel c
- UIView subclass 1
- UILabel 1a
- UILabel 1b
- UIView subclass 2
- UILabel 2a
- UILabel 2b
I'd like VoiceOver to read all the labels in the order presented here. I should note here that visually, the labels in the UIView
subclass are in reversed order (UILabel
1b is on top of UILabel
1a, for example).
Some labels need to have the 'accessibilityLabel' property set to some custom string. It is done in the configuration of the UITableViewCell
, once the text is known, either to labels directly or to subviews. I also set the shouldGroupAccessibilityChildren
property to YES.
Right now, the behaviour I have is: VoiceOver reads the top-level UILabel
(a, b & c in the example). Then if I swipe to get the next element it reads UIView
subclass 1, then 2, etc. When reading those subclasses, the order of reading is fine (UILabel
1a, then 1b, etc.).
Can I achieve this? Or does the user absolutely needs to swipe?