addressed code review comments

This commit is contained in:
Krishna Kishore Bandaru 2023-11-01 18:11:22 +05:30
parent 7b4dd51a74
commit 975882d47c
2 changed files with 4 additions and 2 deletions

View File

@ -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?

View File

@ -7,7 +7,7 @@
//
public class ToggleModel: MoleculeModelProtocol, FormFieldProtocol, Identifiable {
public class ToggleModel: MoleculeModelProtocol, FormFieldProtocol {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------