invalidArgument
invalidArgument

Reputation: 2465

iOS VoiceOver/rotor: header navigation not going back to navigation bar

In the app I'm working on, there is one UITableView with section headers. The tableView is in a UIViewController that is embedded in a UINavigationController. With VoiceOver on, and the rotor set to headings, I want to be able to navigate from one header to the next, back and forth, using the swipe up/down feature.

I have validated that the navigation bar title and the tableView section headers all have the accessibility trait of .headers.

What is currently working:

What is not working:

There is another view controller in the app where it's working, so I know it's possible, but I can't figure out why the behaviours differ.

I tried:

Is there an aspect of it I'm overlooking? What elements/attributes have an impact on the rotor heading navigation?

Upvotes: 1

Views: 1070

Answers (1)

invalidArgument
invalidArgument

Reputation: 2465

It looks like it's a UIKit bug. The difference between working and non-working view controllers is the presence or not of a first section without a header. The image below explains it better. In the picture, the arrows represent working navigation (how VoiceOver focus moves from one headings to the next with swipe up/down gestures).

Diagram of view controller hierarchy with working and non-working navigation

Upon further investigation, I saw that in the Settings app, the Mail section has the same issue. (Screenshot as a reference). If the VoiceOver focus is on "Allow mail to access", swipe up does not lead to the focus on "Mail" title in the navigation bar.

Screen capture of the Mail section of the Settings app in iOS 16

As far as I can tell, SwiftUI does not have the issue, so we'll see about rewriting the view with SwiftUI.

Upvotes: 1

Related Questions