diff --git a/MVMCoreUI/Accessibility/AccessibilityHandler.swift b/MVMCoreUI/Accessibility/AccessibilityHandler.swift index c1376437..729b3881 100644 --- a/MVMCoreUI/Accessibility/AccessibilityHandler.swift +++ b/MVMCoreUI/Accessibility/AccessibilityHandler.swift @@ -175,12 +175,13 @@ extension AccessibilityHandler: MVMCorePresentationDelegateProtocol { public func navigationController(_ navigationController: UINavigationController, displayedViewController viewController: UIViewController) { guard UIAccessibility.isVoiceOverRunning, canPostAccessbilityNotification(for: viewController) else { return } - var navigationOperationType: NavigationType = .push + //TODO: - For Tabbar change: adding 1.5 sec delay to shift focus to the top. for Temp fix added to check on childern count + /*var navigationOperationType: NavigationType = .push if let presentationStyle = delegate?.loadObject??.pageJSON?.optionalStringForKey(KeyPresentationStyle) ?? delegate?.loadObject??.requestParameters?.actionMap?.optionalStringForKey(KeyPresentationStyle), presentationStyle == "root" { - navigationOperationType = .set //TODO: - For Tabbar change: adding 1.5 sec delay to shift focus to the top. - } + navigationOperationType = .set + }*/ let accessbilityElement = getAccessbilityFocusedElement() - post(notification: navigationOperationType == .set ? .controllerChanged : .layoutChanged, argument: accessbilityElement ?? getFirstFocusedElementOnScreen()) + post(notification: navigationController.children.count == 1 ? .controllerChanged : .layoutChanged, argument: accessbilityElement ?? getFirstFocusedElementOnScreen()) } }