Commit 2e0cfc50 authored by Anastasia Helfinstein's avatar Anastasia Helfinstein Committed by Commit Bot

[Switch Access] Detect menus and modal dialogs

If the user navigates to a modal or system menu (other than by focus
automatically jumping there), we should still use the custom behavior
for modals.

AX-Relnotes: n/a.
Bug: None.
Change-Id: Ie0b963f1540568cdd8f249ee016e787de45c0b3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2270468
Auto-Submit: Anastasia Helfinstein <anastasi@google.com>
Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Commit-Queue: Anastasia Helfinstein <anastasi@google.com>
Cr-Commit-Position: refs/heads/master@{#785946}
parent 69deefc6
......@@ -348,6 +348,11 @@ class RootNodeWrapper extends SARootNode {
rootNode.parent.role === chrome.automation.RoleType.WINDOW)) {
return WindowRootNode.buildTree(rootNode);
}
if (rootNode.role === chrome.automation.RoleType.MENU ||
rootNode.role === chrome.automation.RoleType.MENU_BAR ||
rootNode.modal) {
return ModalDialogRootNode.buildTree(rootNode);
}
const root = new RootNodeWrapper(rootNode);
const childConstructor = (node) => NodeWrapper.create(node, root);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment