From 21a45203a33f095db9216717189bcf36e028e7b5 Mon Sep 17 00:00:00 2001 From: Krishna Kishore Bandaru Date: Thu, 6 Jul 2023 20:23:43 +0530 Subject: [PATCH] added temp fix for updated operation type logic --- MVMCoreUI/Accessibility/AccessibilityHandler.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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()) } }