Implements the CDP Accessibility domain with getFullAXTree support,
enabling AI agent tools (agent-browser, Playwright MCP) that rely on
Accessibility.getFullAXTree to work with Obscura.
Changes:
- Add crates/obscura-cdp/src/domains/accessibility.rs (~380 lines)
- Accessibility.enable: returns {}
- Accessibility.getFullAXTree: walks DOM tree, produces AXNode array
- Role mapping: 50+ HTML tags → ARIA roles, respects explicit role attr
- Name computation: aria-label → aria-labelledby → alt → title → placeholder
- Properties: focusable, editable, checked, disabled, level, required, multiline
- Update mod.rs: register accessibility module
- Update dispatch.rs: route Accessibility domain to real handler
Tested with example.com (18 nodes), httpbin.org/html (16 nodes),
news.ycombinator.com (1308 nodes). Zero structure errors.
Closes #12
12 lines
176 B
Rust
12 lines
176 B
Rust
pub mod target;
|
|
pub mod browser;
|
|
pub mod page;
|
|
pub mod dom;
|
|
pub mod runtime;
|
|
pub mod network;
|
|
pub mod fetch;
|
|
pub mod input;
|
|
pub mod storage;
|
|
pub mod accessibility;
|
|
pub mod lp;
|