Posts

Post not yet marked as solved
1 Replies
360 Views
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.
Posted
by mrikh.
Last updated
.