Commit bb26055e authored by Zach Helfinstein's avatar Zach Helfinstein Committed by Commit Bot

SwitchAccess ignore disabled elements

Refining the isActionable method to not include elements that are
disabled.

Bug: None
Change-Id: I05f85282904af5025615cf8efde6945f219bad20
Reviewed-on: https://chromium-review.googlesource.com/1206030Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Zach Helfinstein <zhelfins@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588988}
parent a784487f
......@@ -165,6 +165,10 @@ SwitchAccessPredicate.isActionable = function(node) {
if (state[StateType.OFFSCREEN] || loc.top < 0 || loc.left < 0)
return false;
// Skip things that are disabled.
if (node.restriction === chrome.automation.Restriction.DISABLED)
return false;
// These web containers are not directly actionable.
if (role === RoleType.WEB_VIEW || role === RoleType.ROOT_WEB_AREA)
return false;
......
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