iOS VoiceOver “Heading not found”

我怕爱的太早我们不能终老 提交于 2021-01-27 06:01:01

问题


I have a UITableView where each UITableViewCell has 2 UILabels: 1 header and 1 content. The AccessibilityTrait of the header is set to "header". I'm able to see the trait set correctly when inspecting the simulator screen with Accessibility Inspector. But on the actual device, when I switch the rotor to "Headings", it only finds the navigation bar header, but does not find the headers in the UITableViewCells.


回答1:


To get the accessibility elements with the header trait in your table view cells, you should select the container your rotor inspects (here, the table view).

When you arrive on your page, the rotor inspects the headers in the main container, not in all the others that could exist inside this one.

To reach your goal :

  • Select the Containers rotor item to know if many of them are present on the page.
  • Select the Headings rotor item for each container to get its headers elements.

I don't provide a solution here but that's the way VoiceOver works and, in my view, you should adopt another architecture for your app because it's a little bit messy for the user.



来源:https://stackoverflow.com/questions/54538930/ios-voiceover-heading-not-found

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