How to Extract Accessibility Tree from WebKit Browser for both Web and Mobile

Is there a way to extract the Accessibility Tree directly from the browser? Since Chrome provides an API for it, can we use that to generate a dump of the Accessibility Tree?

There is a WebDriver incubation effort ongoing with a standards proposal to be utilized in Web Platform Tests:

Current test implementation PRs of the above are in Firefox/Gecko and Safari/WebKit, with interest indicated from the Chromium dev teams at Google/Chrome and Microsoft/Edge.

There's a upcoming CSUN session about the above standards effort scheduled for 4:20 PM Pacific on Wednesday March 11.

  • https://conference.csun.at/event/2026/session-schedule

You can also review the WebKit Web Inspector, under "Node > Accessibility" to get parent/child relationships...

I do not recall if the WebKit Inspector JSON protocol used for those relationships is documented thoroughly anywhere, but the open source implementation pointer is: AccessibilityProperties in JavaScriptCore/inspector/protocol /DOM.json.

Cheers.

There's also a way to dump the accessibility tree in WebKit LayoutTests/Accessibility, but be aware the internal accessibility trees are considered a browser engine implementation detail and not standardized anywhere yet. There is no near-term project scheduled to attempt standardization, so there are differences between WebKit, Chromium, Gecko, etc that will likely remain for the foreseeable near-term future.

How to Extract Accessibility Tree from WebKit Browser for both Web and Mobile
 
 
Q