setting an accessibilityLabel on a UIImageView contained in UITableView header

删除回忆录丶 提交于 2019-12-03 07:12:05
Abhishek Singh

In Voice-Over , in order to make an element accessible :-

  1. you have to set setIsAccessibilityElement property as true which i don't find in your code.

  2. The other important point is that to make child elements (subviews) to be accessible , you have to seperately make them accessible while the parent should not be accessible(you have to specify this also).

  3. Implement the UIAccessibilityContainer Protocol in your custom - cell.

It will be a big story if i go on .Please refer this Accessibility voice over by apple.

Hope this helps.

I used KIF for testing my IOS app. In my tableview, I assigned value to tableview.accesssibilityIdentifier instead of tableview.accessibilityLabel. It worked for me. Wanna give it a try?

Voice-Over sometimes can get nasty and just by setting isAccessibilityElement might not work.

In this case try setting accessibilityElements on the parent view and include the child views in the array, like this:

parentView.accessibilityElements = [childView1, childView1, childView1]

Doing it also ensures that the accessibility items are being read in the order you want.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!