Fix context menu overlay accessibility focus

This commit is contained in:
Ilya Laktyushin
2021-03-01 21:22:42 +04:00
parent 9b4f576e77
commit 9dcb3926ea
2 changed files with 14 additions and 0 deletions

View File

@@ -1022,6 +1022,19 @@ open class NavigationController: UINavigationController, ContainableController,
var topHasOpaque = false
var foundControllerInFocus = false
for container in self.globalOverlayContainers.reversed() {
let controller = container.controller
if topHasOpaque {
controller.displayNode.accessibilityElementsHidden = true
} else {
if controller.isOpaqueWhenInOverlay || controller.blocksBackgroundWhenInOverlay {
topHasOpaque = true
}
controller.displayNode.accessibilityElementsHidden = false
}
}
for container in self.overlayContainers.reversed() {
if foundControllerInFocus {
container.controller.isInFocus = false