5

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.

XLE_22
  • 5,124
  • 3
  • 21
  • 72
matchifang
  • 5,190
  • 12
  • 47
  • 76

1 Answers1

0

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.

XLE_22
  • 5,124
  • 3
  • 21
  • 72
  • 1
    As a developer, does this provide anything actionable for helping voiceover users detect 'Headings' that aren't in the outermost container? Suggesting that users switch their rotor setting away from 'Heading' in order to discover Headings isn't really a solution. – c_booth Apr 15 '19 at 19:06
  • @c_booth : my answer just dealt with explaining why the headings weren't found and how the system works : the question didn't ask for a solution I cannot provide actually. As a developer, I think that this is a situation it's better to be avoided : set another kind of structure to provide information. – XLE_22 Apr 15 '19 at 20:25