I've got a view controller that contains a table view along with a few "floating" controls that appear visually at the bottom of the screen.
When navigating with VoiceOver, it would make more sense for the user to navigate like:
- back button (navigation bar)
- title (navigation bar)
- edit button (navigation bar)
- floating button
- table contents
But currently, the navigation order is
- back button (navigation bar)
- title (navigation bar)
- edit button (navigation bar)
- table contents
- floating button
When I explicitly set the accessibility elements for my view controller's view to change the order like
- (void)viewDidLoad {
self.accessibilityElements = @[self.floatingButton, self.tableView];
}
the navigation order becomes
- floating button
- table contents
and the navigation bar is no longer accessible.
If I include self.navigationController.navigationBar
at the beginning of the accessibilityElements
array, then I get the navigation order
- back button (navigation bar)
- title (navigation bar)
- edit button (navigation bar)
and swiping right again navigates back to the back button, so I can't reach the floating button or table contents.
Is there a way to reorder the accessible subviews without also losing access to the navigation bar?