Accessibility: VoiceOver rotor: Adding header traits to tableview sections

I have a screen with a vertical scrolling tableview that contains 100s of items. We group the rows into different sections. For some reason we don't utilize viewForHeaderInSection but we fake the apperance of a section by styling a UITableViewCell. From the tableView's perspective everything is a tableViewCell with no sections (we only have 1 section for the entire tableView).

We have two different kind of cells. one for the fake section and another for the regular item.

I have added the .header property to accessibilityTraits on the tableViewCell that's for the section and it works sometimes.

The issue i'm running into is that if the section cell is not visible on-screen, i can't jump from one header to next header using the VoiceOver rotor. I have tried few different things but it simply refuses to jump from one 'section' to another unless both 'sections' are visible on screen.

I also tried creating a real viewForHeaderInSection and returning them to rule out the possibility that it's because the cells are not drawn on-screen. That didn't help.

The behavior I'm trying to achieve is done on the Settings app > Notifications. There both NOTIFICATION STYLE and GOVERNMENT ALERTS are headers and i can jump between them (even though neither are visible at the same time). When i jump between them, it automatically scrolls the tableview which is what i'm hoping to achieve in my app.

Does anyone have any idea?


  • hi, I meet the same issue, did you resolve it?

Add a Comment

Replies

here's a sample viewController that i wrote to re-create this issue.

the header rotor navigation works as long as the view is visible on-screen. Ideally i would like to let the user jump to the next item with header traits so they don't have to go through the normal cells. Looking at the Settings app, this is somehow possible.