diff --git a/src/cdp/AXNode.zig b/src/cdp/AXNode.zig index cd329b6c..1e07f164 100644 --- a/src/cdp/AXNode.zig +++ b/src/cdp/AXNode.zig @@ -899,9 +899,14 @@ fn isIgnore(self: AXNode, page: *Page) bool { const node = self.dom; const role_attr = self.role_attr; - if (node.is(DOMNode.Element.Html) == null) { + // Don't ignore non-Element node: CData, Document... + if (node.is(DOMNode.Element) == null) { return false; } + // Ignore non-HTML elements: svg... + if (node.is(DOMNode.Element.Html) == null) { + return true; + } const elt = node.as(DOMNode.Element); const tag = elt.getTag(); switch (tag) {