Voice Over in UITableViewCell with child view controllers

The structure of the UI is a bit complicated. I'll do my best to explain. There is a UITableView that has a sibling in its view hierarchy. Footer buttons that come on top of the UITableView at the bottom of the screen. I am using a one finger swipe gesture to iterate over different elements on the page and in the table view.

Each cell in the UITableView has a UIViewController which has a UICollectionView. This UICollectionView has cells that have multiple views nested inside with most of them being dummy views. The cells have different structures and the voice over works well across them without any customisation and is able to identify all the right accessibility elements. Now the problem comes in the last cell on the page.

Imagine it has 2 UILabels and 2 UIButtons. When navigating using normal voice over and not defining any accessibilityElements, the order is weird so I added

 override var accessibilityElements: [Any]?{
  get{
        return [label1, button1, label2, button2]
  }set {}

When navigating to this cell, everything works fine but once an element inside this particular last cell is highlighted it gets messed up. The order works fine but the voice over ends up looping inside the cell. It doesn't go back to the other cells or navigate to the footer of the page. If I remove the accessibilityElements array then everything is fine but not in the correct order.

Anybody know why that might be and how to break the loop? It would be helpful if I could know how voice over recognises which view to navigate to next.

Replies

Hello, please take a few minutes and file a bug using this link: https://developer.apple.com/bug-reporting/

If you could, reproduce the issue then begin filing a bug report. This will allow you to upload sysdiagnose logs from the device so we can look into specifically why this is happening. Additionally, if you could upload any sample code (for the tableView you're describing) and a screen recording, it may help the team triage the issue faster.

When you file the bug feel free to post the Feedback ID here and I can make sure it gets send to the right folks. Thanks!