I met this problem recently. Basically, I want the voice-over back to the first element ( the bar item ) when the alert is dismissed.
I had tried passing the bar item
UIAlertAction *okAction = [UIAlertAction actionWithTitle: @"OK" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) { dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, self.navigationItem.leftBarButtonItem); }); }];
I also tried passing nil to UIAccessibilityScreenChangedNotification
.
I also tried setting accessibility elements in this controller or in the view in the controller. But none of the above works.
When I tested it on iPhone Xr (iOS 15), there was no problem. But it's not working on iPhone 8 Plus (iOS 14). The issue with iPhone 8 Plus (iOS 14) is that the voice-over just randomly focuses on some element on the view.
I was searching in docs, forums and websites but could not really find any help. Maybe someone has made the same experience and could share the solution with me.
Thank you in advance!