Unwanted VoiceOver focus on UITableViewCell

44 Views Asked by At

This is with voiceover turned on.

I have a UITableView that has 2 cells, didSelectRow will push another viewController on the navigation stack.

I see a focused container for a brief moment in this pushed view at the location where the cell was in previous view. And it will read out the cell partially until it gets interrupted by the back button on the current screen.

When I press back the voice over focus goes to that cell that was last selected.



I've tried to do UIAccessibility.post(notification: .screenChanged, argument: self.navigationItem.leftBarButtonItem) in viewDidAppear with and without a delay. It does focus the backbutton for a brief moment before being interrupted by the cell.

I've also tried to toggle accessibilityElementsHidden but the focus just keeps going back to this cell as soon as I unhide it.

I am not reloading my tableview anywhere. I also set breakpoints in the tableview delegate functions to see if it does stop anywhere and it doesn't.

I'm expecting VoiceOver to focus on the top left most UIElement which should be the navigation bars back button.

0

There are 0 best solutions below