2

I'm having a custom UITableViewCell and it contains some labels and imageViews. Now everything works great except when voice over is turned on.

The accessibility label is spoken like excepted but when it's not possible to click on the row it just repeats the label. So the user can't select the row.

didSelectIndexPath is not called. This is not the case when voice over is turned off.

I found a topic and they solve it with setting isAccessibilityElement to true on the cell. This indeed solves the problem but creates another problem that the accessibility label is not spoken anymore it just says selection and not the label anymore.

how can I solve this?

KSR
  • 1,699
  • 15
  • 22
user1007522
  • 7,858
  • 17
  • 69
  • 113
  • Usually first user selects element with single tap or by swiping left and right between elements, and double tap selects the element. Standard cells are accessibility elements by default, but for custom cell if you do that, you block entire subview hierarchy from VO so you have to provide accessibilityLabel yourself for entire cell. – pronebird Aug 31 '16 at 10:59

1 Answers1

4

When the accessibility is turned on, you need to tap twice to select a row or a button, and you need to swipe with three fingers.

By Setting the cell.isAccessibleElement to true, you are telling that cell itself is accessible but not its elements.

You should not do that.Instead try setting the all elements in the cell accessible and then do double tap to actually select the row.

Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109