diff --git a/MVMCoreUI/Accessibility/AccessibilityHandler.swift b/MVMCoreUI/Accessibility/AccessibilityHandler.swift index d8053cf9..96053673 100644 --- a/MVMCoreUI/Accessibility/AccessibilityHandler.swift +++ b/MVMCoreUI/Accessibility/AccessibilityHandler.swift @@ -100,9 +100,10 @@ open class AccessibilityHandler { /** This method return first focused element from the screen. + If navigationBar is hidden then we are returning nil so that voice over will shift to the first interactive element. */ open func getFirstFocusedElementOnScreen() -> Any? { - (delegate as? UIViewController)?.navigationController?.navigationBar + ((delegate as? PageProtocol)?.pageModel?.navigationBar?.hidden ?? false) ? nil : (delegate as? UIViewController)?.navigationController?.navigationBar } /** @@ -245,6 +246,7 @@ extension AccessibilityHandler { /** To notify AccessibilityHandler about the page visibility changes */ +//TODO: Revisit why we need a behavior as a notifier. open class AccessibilityHandlerBehavior: PageVisibilityBehavior, PageMoleculeTransformationBehavior { public let accessibilityHandler: AccessibilityHandler? diff --git a/MVMCoreUI/Atomic/Atoms/Selectors/ToggleModel.swift b/MVMCoreUI/Atomic/Atoms/Selectors/ToggleModel.swift index 008c2911..f4ce9234 100644 --- a/MVMCoreUI/Atomic/Atoms/Selectors/ToggleModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Selectors/ToggleModel.swift @@ -7,7 +7,7 @@ // -public class ToggleModel: MoleculeModelProtocol, FormFieldProtocol, Identifiable { +public class ToggleModel: MoleculeModelProtocol, FormFieldProtocol { //-------------------------------------------------- // MARK: - Properties //--------------------------------------------------