mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
SemanticTree: improve accessibility tree and name calculation
- Add more structural roles (banner, navigation, main, list, etc.). - Implement fallback for accessible names (SVG titles, image alt text). - Skip children for leaf-like semantic nodes to reduce redundancy. - Disable pruning in the default semantic tree view.
This commit is contained in:
@@ -113,12 +113,12 @@ pub fn fetch(app: *App, url: [:0]const u8, opts: FetchOpts) !void {
|
||||
var registry = CDPNode.Registry.init(app.allocator);
|
||||
defer registry.deinit();
|
||||
|
||||
const st = SemanticTree{
|
||||
const st: SemanticTree = .{
|
||||
.dom_node = page.window._document.asNode(),
|
||||
.registry = ®istry,
|
||||
.page = page,
|
||||
.arena = page.call_arena,
|
||||
.prune = true,
|
||||
.prune = false,
|
||||
};
|
||||
|
||||
if (mode == .semantic_tree) {
|
||||
|
||||
Reference in New Issue
Block a user