mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(a11y): query only unignored nodes (#12224)
This commit is contained in:
parent
a63b8305ac
commit
e20cd64fff
@ -27,7 +27,16 @@ const queryAXTree = async (
|
||||
role,
|
||||
});
|
||||
return nodes.filter((node: Protocol.Accessibility.AXNode) => {
|
||||
return !node.role || !NON_ELEMENT_NODE_ROLES.has(node.role.value);
|
||||
if (node.ignored) {
|
||||
return false;
|
||||
}
|
||||
if (!node.role) {
|
||||
return false;
|
||||
}
|
||||
if (NON_ELEMENT_NODE_ROLES.has(node.role.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user