Skip to content

Truly independent web browser

731 B
Raw Blame
<!DOCTYPE html>
<script src="include.js"></script>
<svg width="100" height="100">
    <g role="region"><circle cx="20" cy="20" r="10"/></g>
    <g role="region" aria-label="Named region"><circle cx="50" cy="50" r="10"/></g>
    <g role="form"><circle cx="80" cy="80" r="10"/></g>
    <circle role="region" cx="20" cy="80" r="10"/>
</svg>
<script>
    test(() => {
        const dump = (node, depth) => {
            const name = node.name ? ` "${node.name}"` : "";
            println(`${"  ".repeat(depth)}${node.role || "(no role)"}${name}`);
            for (const child of node.children ?? [])
                dump(child, depth + 1);
        };
        dump(JSON.parse(internals.dumpAccessibilityTree()), 0);
    });
</script>