feat(cdp): implement Accessibility domain (getFullAXTree)

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
This commit is contained in:
zhangyang-crazy-one committed 2026-04-27 12:02:38 +08:00
1 parent 99e75f1e62
commit a4591707e3
3 files changed
+381 -1

No files matched your search

+1
View File
@@ -7,4 +7,5 @@ pub mod network;
pub mod fetch;
pub mod input;
pub mod storage;
pub mod accessibility;
pub mod lp;