Skip to content

Truly independent web browser

780 B
Raw Blame
<!DOCTYPE html>
<script src="include.js"></script>
<ul style="display:contents"><li>Contents item</li></ul>
<div style="display:contents" role="group" aria-label="Contents group"><button>Grouped button</button></div>
<script>
    test(() => {
        const dump = (node, depth) => {
            const name = node.role === "text leaf" ? ` ${JSON.stringify(node.name)}` : node.name ? ` "${node.name}"` : "";
            const description = node.description ? ` description="${node.description}"` : "";
            println(`${"  ".repeat(depth)}${node.role || "(no role)"}${name}${description}`);
            for (const child of node.children ?? [])
                dump(child, depth + 1);
        };
        dump(JSON.parse(internals.dumpAccessibilityTree()), 0);
    });
</script>