When I swipe right on the navigation title after it is selected upon entering the screen, voiceover goes to the close button next to it. However, when I try swiping right again, the header label is not selected. If I tap on the label, it gets selected, then swiping left goes to the close button as expected. Then swiping right goes to the header label as desired. How do I get it so swiping right on the close button goes to the header label on the first try?
Here is the relevant code:
override dynamic func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = UIColor.Background.base1
view.accessibilityElements = []
layoutViews()
}
override dynamic func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
UIAccessibility.post(notification: .screenChanged, argument: navigationController?.navigationBar)
view.accessibilityElements = [navigationController?.navigationBar, paymentCanceledLabel].compactMap { $0 }
}
Thanks for any feedback.