Skip to content

Add Computed Accessibility Properties section#2800

Draft
spectranaut wants to merge 19 commits into
mainfrom
computed-accessibility-properties
Draft

Add Computed Accessibility Properties section#2800
spectranaut wants to merge 19 commits into
mainfrom
computed-accessibility-properties

Conversation

@spectranaut

@spectranaut spectranaut commented May 28, 2026

Copy link
Copy Markdown
Contributor

🚀 Netlify Preview:
🔄 this PR updates the following sspecs:

@netlify

netlify Bot commented May 28, 2026

Copy link
Copy Markdown

Deploy Preview for wai-aria ready!

Name Link
🔨 Latest commit 939cdb2
🔍 Latest deploy log https://app.netlify.com/projects/wai-aria/deploys/6a6108567870ba0008ec1aab
😎 Deploy Preview https://deploy-preview-2800--wai-aria.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed on https://deploy-preview-2800--wai-aria.netlify.app

@github-actions
github-actions Bot temporarily deployed to pull request June 2, 2026 21:18 Inactive
@github-actions
github-actions Bot temporarily deployed to pull request June 2, 2026 21:48 Inactive
Comment thread core-aam/index.html
Comment thread core-aam/index.html
Comment thread core-aam/index.html
Comment thread core-aam/index.html
@github-actions
github-actions Bot temporarily deployed to pull request June 3, 2026 18:19 Inactive
@spectranaut
spectranaut marked this pull request as ready for review June 3, 2026 21:12
@github-actions
github-actions Bot temporarily deployed to pull request June 3, 2026 21:15 Inactive
@spectranaut

Copy link
Copy Markdown
Contributor Author

Hi @jcsteh, @cookiecrook, @rahimabdi, @lucasradaelli -- this is ready for review based on the feedback from yesterday's meeting. Here is a link to the added section

I only included "Computed Accessibility Properties" for the following rows:

  • aria-description
  • aria-checked
  • aria-pressed
  • aria-label
  • aria-labelledby
  • aria-level
  • aria-multiline
  • aria-orientation
  • aria-required
  • aria-roledecription
  • aria-selected

Let me know what you think of this list, we can remove or add things!

@github-actions
github-actions Bot temporarily deployed to pull request June 3, 2026 21:55 Inactive
@spectranaut
spectranaut requested a review from cookiecrook June 4, 2026 15:36
@cyns
cyns self-requested a review June 4, 2026 17:10
Comment thread core-aam/index.html Outdated
Comment thread core-aam/index.html Outdated
Comment thread core-aam/index.html Outdated
Comment thread core-aam/index.html Outdated
Comment thread core-aam/index.html Outdated
</ol>
</aside>
<p>
When the state or property does not have a default value other than undefined, is not required on a given role, and is missing, undefined, or set to a invalid token, user agents MUST NOT include it the computed accessibility properties. When a state or property has a default value other than undefined and is supported but not required on a given role, user agents MAY include it in the computed accessibility properties.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative (or addition) to the "MAY" case here is something like:

"When a state or property has a default value other than undefined, is supported but not required on a given role and is not mapped on all platforms, user agents MUST NOT include it in the computed accessibility properties."

This would mean that we have a clear rule for aria-required="false", for example: we do not include it in the property bag.

That said, I see you already have "Do not expose required" for aria-required="false". Does that already fit one of the rules here and I'm just missing it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.. right. So below, in the tables, when something is not mapped, it seems to make sense to write "Do not expose". I guess, without thinking about it too clearly, it seemed like I didn't have to put the case you suggested into the prose because it would always be covered below.

But I suppose it's fine to be overly pedantic, this is a technical specification, I'm going to include your sentence (and the "may") for now.

rahimabdi pushed a commit to rahimabdi/WebKit that referenced this pull request Jun 30, 2026
…ccessibilityPropertiesForAccessibilityNode commands

https://bugs.webkit.org/show_bug.cgi?id=299508
rdar://161303091

Reviewed by NOBODY (OOPS!).

This patch implements two new WebDriver automation commands used to support more robust WPT accessibility testing:
- GetAccessibilityPropertiesForElement
- GetAccessibilityPropertiesForAccessibilityNode

For this initial implementation, test_driver.get_accessibility_properties...() will return an accessibility property bag
containing the following computed properties:
- accessibilityNodeId
- role
- label
- checked
- pressed
- children (array of serialized AXIDs)
- parent (serialized AXID)

As these new WebDriver commands are test-only interfaces, there's been in-depth discussion around how to treat computed
AX properties when a property is missing and supported, or present & unsupported; see WICG/aom#203.

Some additional resources:
- WebDriver PR for the new commands: w3c/webdriver#1960
- ARIA PR for the initial set of computed accessibility properties, and treatment of undefined/missing/unsupported values: w3c/aria#2800.

At a high level, the WebDriver client (i.e., Web Platform Tests' testdriver.js) initiates these new commands
which is then dispatched to the UI Process (WebAutomationSession). The WebAutomationSession then parses the payload
and extracts the protocol-specific element or accessibility node, after which it identifies the target (WebPageProxy)
which invokes an asynchronous IPC message to the corresponding Web Process. Note that GetAccessibilityPropertiesForElement
uses the same DOM node/frame-based approach as many other WebDriver commands however, GetAccessibilityPropertiesForAXNode does
not require frame-based process routing (it retrieves computed accessibility properties using the page's axObjectCache, rather
than a specific frame tied to a DOM node); thus, GetAccessibilityPropertiesForAccessibilityNode has a different message signature.

Note that to fully support these new WebDriver commands, corresponding WebDriver HTTP endpoints must be implemented in Webdriver for Safari (safaridriver):
- session/{session_id}/element/{elId}/accessibilityproperties: Returns accessibility properties for DOM element {elId}
- session/{session_id}/accessibility/properties/{accessibilityId}: Returns accessibility properties for accessibility node {accessibilityId}

Due to the existence of two AccessibilityProperties protocol object definitions, documentation for each has been updated:
- Source/WebKit/UIProcess/Automation/Automation.json — specification conformance and interoperability testing
- Source/JavaScriptCore/inspector/protocol/DOM.json — Web Inspector DOM element inspection

As an unrelated small fix, the return type for GetComputedLabel (WebAutomationSessionProxy IPC message) incorrectly names the first string parameter as "role"
instead of "label" so this patch also corrects the tuple to return (label, errorType).

* LayoutTests/resources/testdriver-vendor.js:
(window.test_driver_internal.get_accessibility_properties_for_element):
(window.test_driver_internal.get_accessibility_properties_for_accessibility_node):
* Source/JavaScriptCore/inspector/protocol/DOM.json
* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(Ref<JSON::ArrayOf<String>> buildArrayForAXChildren)
(WebKit::WebAutomationSession::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSession::getAccessibilityPropertiesForAccessibilityNode):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForAccessibilityNode):
(WebKit::WebAutomationSessionProxy::getAccessibilityObjectForAXNode)
(WebAutomationSessionProxy::ComputedAXProperties getComputedAccessibilityProperties)
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in:
rahimabdi pushed a commit to rahimabdi/WebKit that referenced this pull request Jun 30, 2026
…ccessibilityPropertiesForAccessibilityNode commands

https://bugs.webkit.org/show_bug.cgi?id=299508
rdar://161303091

Reviewed by NOBODY (OOPS!).

This patch implements two new WebDriver automation commands used to support more robust WPT accessibility testing:
- GetAccessibilityPropertiesForElement
- GetAccessibilityPropertiesForAccessibilityNode

For this initial implementation, test_driver.get_accessibility_properties...() will return an accessibility property bag
containing the following computed properties:
- accessibilityNodeId
- role
- label
- checked
- pressed
- children (array of serialized AXIDs)
- parent (serialized AXID)

As these new WebDriver commands are test-only interfaces, there's been in-depth discussion around how to treat computed
AX properties when a property is missing and supported, or present & unsupported; see WICG/aom#203.

Some additional resources:
- WebDriver PR for the new commands: w3c/webdriver#1960
- ARIA PR for the initial set of computed accessibility properties, and treatment of undefined/missing/unsupported values: w3c/aria#2800.

At a high level, the WebDriver client (i.e., Web Platform Tests' testdriver.js) initiates these new commands
which is then dispatched to the UI Process (WebAutomationSession). The WebAutomationSession then parses the payload
and extracts the protocol-specific element or accessibility node, after which it identifies the target (WebPageProxy)
which invokes an asynchronous IPC message to the corresponding Web Process. Note that GetAccessibilityPropertiesForElement
uses the same DOM node/frame-based approach as many other WebDriver commands however, GetAccessibilityPropertiesForAXNode does
not require frame-based process routing (it retrieves computed accessibility properties using the page's axObjectCache, rather
than a specific frame tied to a DOM node); thus, GetAccessibilityPropertiesForAccessibilityNode has a different message signature.

Note that to fully support these new WebDriver commands, corresponding WebDriver HTTP endpoints must be implemented in Webdriver for Safari (safaridriver):
- session/{session_id}/element/{elId}/accessibilityproperties: Returns accessibility properties for DOM element {elId}
- session/{session_id}/accessibility/properties/{accessibilityId}: Returns accessibility properties for accessibility node {accessibilityId}

Due to the existence of two AccessibilityProperties protocol object definitions, documentation for each has been updated:
- Source/WebKit/UIProcess/Automation/Automation.json — specification conformance and interoperability testing
- Source/JavaScriptCore/inspector/protocol/DOM.json — Web Inspector DOM element inspection

As an unrelated small fix, the return type for GetComputedLabel (WebAutomationSessionProxy IPC message) incorrectly names the first string parameter as "role"
instead of "label" so this patch also corrects the tuple to return (label, errorType).

* LayoutTests/resources/testdriver-vendor.js:
(window.test_driver_internal.get_accessibility_properties_for_element):
(window.test_driver_internal.get_accessibility_properties_for_accessibility_node):
* Source/JavaScriptCore/inspector/protocol/DOM.json
* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(Ref<JSON::ArrayOf<String>> buildArrayForAXChildren)
(WebKit::WebAutomationSession::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSession::getAccessibilityPropertiesForAccessibilityNode):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForAccessibilityNode):
(WebKit::WebAutomationSessionProxy::getAccessibilityObjectForAXNode)
(WebAutomationSessionProxy::ComputedAXProperties getComputedAccessibilityProperties)
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in:
rahimabdi pushed a commit to rahimabdi/WebKit that referenced this pull request Jul 1, 2026
…ccessibilityPropertiesForAccessibilityNode commands

https://bugs.webkit.org/show_bug.cgi?id=299508
rdar://161303091

Reviewed by NOBODY (OOPS!).

This patch implements two new WebDriver automation commands used to support more robust WPT accessibility testing:
- GetAccessibilityPropertiesForElement
- GetAccessibilityPropertiesForAccessibilityNode

For this initial implementation, test_driver.get_accessibility_properties...() will return an accessibility property bag
containing the following computed properties:
- accessibilityNodeId
- role
- label
- checked
- pressed
- children (array of serialized AXIDs)
- parent (serialized AXID)

As these new WebDriver commands are test-only interfaces, there's been in-depth discussion around how to treat computed
AX properties when a property is missing and supported, or present & unsupported; see WICG/aom#203.

Some additional resources:
- WebDriver PR for the new commands: w3c/webdriver#1960
- ARIA PR for the initial set of computed accessibility properties, and treatment of undefined/missing/unsupported values: w3c/aria#2800.

At a high level, the WebDriver client (i.e., Web Platform Tests' testdriver.js) initiates these new commands
which is then dispatched to the UI Process (WebAutomationSession). The WebAutomationSession then parses the payload
and extracts the protocol-specific element or accessibility node, after which it identifies the target (WebPageProxy)
which invokes an asynchronous IPC message to the corresponding Web Process. Note that GetAccessibilityPropertiesForElement
uses the same DOM node/frame-based approach as many other WebDriver commands however, GetAccessibilityPropertiesForAXNode does
not require frame-based process routing (it retrieves computed accessibility properties using the page's axObjectCache, rather
than a specific frame tied to a DOM node); thus, GetAccessibilityPropertiesForAccessibilityNode has a different message signature.

Note that to fully support these new WebDriver commands, corresponding WebDriver HTTP endpoints must be implemented in Webdriver for Safari (safaridriver):
- session/{session_id}/element/{elId}/accessibilityproperties: Returns accessibility properties for DOM element {elId}
- session/{session_id}/accessibility/properties/{accessibilityId}: Returns accessibility properties for accessibility node {accessibilityId}

Due to the existence of two AccessibilityProperties protocol object definitions, documentation for each has been updated:
- Source/WebKit/UIProcess/Automation/Automation.json — specification conformance and interoperability testing
- Source/JavaScriptCore/inspector/protocol/DOM.json — Web Inspector DOM element inspection

As an unrelated small fix, the return type for GetComputedLabel (WebAutomationSessionProxy IPC message) incorrectly names the first string parameter as "role"
instead of "label" so this patch also corrects the tuple to return (label, errorType).

* LayoutTests/resources/testdriver-vendor.js:
(window.test_driver_internal.get_accessibility_properties_for_element):
(window.test_driver_internal.get_accessibility_properties_for_accessibility_node):
* Source/JavaScriptCore/inspector/protocol/DOM.json
* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(Ref<JSON::ArrayOf<String>> buildArrayForAXChildren)
(WebKit::WebAutomationSession::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSession::getAccessibilityPropertiesForAccessibilityNode):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForAccessibilityNode):
(WebKit::WebAutomationSessionProxy::getAccessibilityObjectForAXNode)
(WebAutomationSessionProxy::ComputedAXProperties getComputedAccessibilityProperties)
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in:
rahimabdi pushed a commit to rahimabdi/WebKit that referenced this pull request Jul 1, 2026
…ccessibilityPropertiesForAccessibilityNode commands

https://bugs.webkit.org/show_bug.cgi?id=299508
rdar://161303091

Reviewed by NOBODY (OOPS!).

This patch implements two new WebDriver automation commands used to support more robust WPT accessibility testing:
- GetAccessibilityPropertiesForElement
- GetAccessibilityPropertiesForAccessibilityNode

For this initial implementation, test_driver.get_accessibility_properties...() will return an accessibility property bag
containing the following computed properties:
- accessibilityNodeId
- role
- label
- checked
- pressed
- children (array of serialized AXIDs)
- parent (serialized AXID)

As these new WebDriver commands are test-only interfaces, there's been in-depth discussion around how to treat computed
AX properties when a property is missing and supported, or present & unsupported; see WICG/aom#203.

Some additional resources:
- WebDriver PR for the new commands: w3c/webdriver#1960
- ARIA PR for the initial set of computed accessibility properties, and treatment of undefined/missing/unsupported values: w3c/aria#2800.

At a high level, the WebDriver client (i.e., Web Platform Tests' testdriver.js) initiates these new commands
which is then dispatched to the UI Process (WebAutomationSession). The WebAutomationSession then parses the payload
and extracts the protocol-specific element or accessibility node, after which it identifies the target (WebPageProxy)
which invokes an asynchronous IPC message to the corresponding Web Process. Note that GetAccessibilityPropertiesForElement
uses the same DOM node/frame-based approach as many other WebDriver commands however, GetAccessibilityPropertiesForAXNode does
not require frame-based process routing (it retrieves computed accessibility properties using the page's axObjectCache, rather
than a specific frame tied to a DOM node); thus, GetAccessibilityPropertiesForAccessibilityNode has a different message signature.

Note that to fully support these new WebDriver commands, corresponding WebDriver HTTP endpoints must be implemented in Webdriver for Safari (safaridriver):
- session/{session_id}/element/{elId}/accessibilityproperties: Returns accessibility properties for DOM element {elId}
- session/{session_id}/accessibility/properties/{accessibilityId}: Returns accessibility properties for accessibility node {accessibilityId}

Due to the existence of two AccessibilityProperties protocol object definitions, documentation for each has been updated:
- Source/WebKit/UIProcess/Automation/Automation.json — specification conformance and interoperability testing
- Source/JavaScriptCore/inspector/protocol/DOM.json — Web Inspector DOM element inspection

As an unrelated small fix, the return type for GetComputedLabel (WebAutomationSessionProxy IPC message) incorrectly names the first string parameter as "role"
instead of "label" so this patch also corrects the tuple to return (label, errorType).

* LayoutTests/resources/testdriver-vendor.js:
(window.test_driver_internal.get_accessibility_properties_for_element):
(window.test_driver_internal.get_accessibility_properties_for_accessibility_node):
* Source/JavaScriptCore/inspector/protocol/DOM.json
* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(Ref<JSON::ArrayOf<String>> buildArrayForAXChildren)
(WebKit::WebAutomationSession::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSession::getAccessibilityPropertiesForAccessibilityNode):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForAccessibilityNode):
(WebKit::WebAutomationSessionProxy::getAccessibilityObjectForAXNode)
(WebAutomationSessionProxy::ComputedAXProperties getComputedAccessibilityProperties)
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in:
rahimabdi pushed a commit to rahimabdi/WebKit that referenced this pull request Jul 1, 2026
…ccessibilityPropertiesForAccessibilityNode commands

https://bugs.webkit.org/show_bug.cgi?id=299508
rdar://161303091

Reviewed by NOBODY (OOPS!).

This patch implements two new WebDriver automation commands used to support more robust WPT accessibility testing:
- GetAccessibilityPropertiesForElement
- GetAccessibilityPropertiesForAccessibilityNode

For this initial implementation, test_driver.get_accessibility_properties...() will return an accessibility property bag
containing the following computed properties:
- accessibilityNodeId
- role
- label
- checked
- pressed
- children (array of serialized AXIDs)
- parent (serialized AXID)

As these new WebDriver commands are test-only interfaces, there's been in-depth discussion around how to treat computed
AX properties when a property is missing and supported, or present & unsupported; see WICG/aom#203.

Some additional resources:
- WebDriver PR for the new commands: w3c/webdriver#1960
- ARIA PR for the initial set of computed accessibility properties, and treatment of undefined/missing/unsupported values: w3c/aria#2800.

At a high level, the WebDriver client (i.e., Web Platform Tests' testdriver.js) initiates these new commands
which is then dispatched to the UI Process (WebAutomationSession). The WebAutomationSession then parses the payload
and extracts the protocol-specific element or accessibility node, after which it identifies the target (WebPageProxy)
which invokes an asynchronous IPC message to the corresponding Web Process. Note that GetAccessibilityPropertiesForElement
uses the same DOM node/frame-based approach as many other WebDriver commands however, GetAccessibilityPropertiesForAXNode does
not require frame-based process routing (it retrieves computed accessibility properties using the page's axObjectCache, rather
than a specific frame tied to a DOM node); thus, GetAccessibilityPropertiesForAccessibilityNode has a different message signature.

Note that to fully support these new WebDriver commands, corresponding WebDriver HTTP endpoints must be implemented in Webdriver for Safari (safaridriver):
- session/{session_id}/element/{elId}/accessibilityproperties: Returns accessibility properties for DOM element {elId}
- session/{session_id}/accessibility/properties/{accessibilityId}: Returns accessibility properties for accessibility node {accessibilityId}

Due to the existence of two AccessibilityProperties protocol object definitions, documentation for each has been updated:
- Source/WebKit/UIProcess/Automation/Automation.json — specification conformance and interoperability testing
- Source/JavaScriptCore/inspector/protocol/DOM.json — Web Inspector DOM element inspection

As an unrelated small fix, the return type for GetComputedLabel (WebAutomationSessionProxy IPC message) incorrectly names the first string parameter as "role"
instead of "label" so this patch also corrects the tuple to return (label, errorType).

* LayoutTests/resources/testdriver-vendor.js:
(window.test_driver_internal.get_accessibility_properties_for_element):
(window.test_driver_internal.get_accessibility_properties_for_accessibility_node):
* Source/JavaScriptCore/inspector/protocol/DOM.json
* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(Ref<JSON::ArrayOf<String>> buildArrayForAXChildren)
(WebKit::WebAutomationSession::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSession::getAccessibilityPropertiesForAccessibilityNode):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForAccessibilityNode):
(WebKit::WebAutomationSessionProxy::getAccessibilityObjectForAXNode)
(WebAutomationSessionProxy::ComputedAXProperties getComputedAccessibilityProperties)
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in:
rahimabdi pushed a commit to rahimabdi/WebKit that referenced this pull request Jul 1, 2026
…ccessibilityPropertiesForAccessibilityNode commands

https://bugs.webkit.org/show_bug.cgi?id=299508
rdar://161303091

Reviewed by NOBODY (OOPS!).

This patch implements two new WebDriver automation commands used to support more robust WPT accessibility testing:
- GetAccessibilityPropertiesForElement
- GetAccessibilityPropertiesForAccessibilityNode

For this initial implementation, test_driver.get_accessibility_properties...() will return an accessibility property bag
containing the following computed properties:
- accessibilityNodeId
- role
- label
- checked
- pressed
- children (array of serialized AXIDs)
- parent (serialized AXID)

As these new WebDriver commands are test-only interfaces, there's been in-depth discussion around how to treat computed
AX properties when a property is missing and supported, or present & unsupported; see WICG/aom#203.

Some additional resources:
- WebDriver PR for the new commands: w3c/webdriver#1960
- ARIA PR for the initial set of computed accessibility properties, and treatment of undefined/missing/unsupported values: w3c/aria#2800.

At a high level, the WebDriver client (i.e., Web Platform Tests' testdriver.js) initiates these new commands
which is then dispatched to the UI Process (WebAutomationSession). The WebAutomationSession then parses the payload
and extracts the protocol-specific element or accessibility node, after which it identifies the target (WebPageProxy)
which invokes an asynchronous IPC message to the corresponding Web Process. Note that GetAccessibilityPropertiesForElement
uses the same DOM node/frame-based approach as many other WebDriver commands however, GetAccessibilityPropertiesForAXNode does
not require frame-based process routing (it retrieves computed accessibility properties using the page's axObjectCache, rather
than a specific frame tied to a DOM node); thus, GetAccessibilityPropertiesForAccessibilityNode has a different message signature.

Note that to fully support these new WebDriver commands, corresponding WebDriver HTTP endpoints must be implemented in Webdriver for Safari (safaridriver):
- session/{session_id}/element/{elId}/accessibilityproperties: Returns accessibility properties for DOM element {elId}
- session/{session_id}/accessibility/<accessibility node id>/properties/{accessibility node id}: Returns accessibility properties for accessibility node {accessibility node id}

Due to the existence of two AccessibilityProperties protocol object definitions, documentation for each has been updated:
- Source/WebKit/UIProcess/Automation/Automation.json — specification conformance and interoperability testing
- Source/JavaScriptCore/inspector/protocol/DOM.json — Web Inspector DOM element inspection

As an unrelated small fix, the return type for GetComputedLabel (WebAutomationSessionProxy IPC message) incorrectly names the first string parameter as "role"
instead of "label" so this patch also corrects the tuple to return (label, errorType).

* LayoutTests/resources/testdriver-vendor.js:
(window.test_driver_internal.get_accessibility_properties_for_element):
(window.test_driver_internal.get_accessibility_properties_for_accessibility_node):
* Source/JavaScriptCore/inspector/protocol/DOM.json
* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(Ref<JSON::ArrayOf<String>> buildArrayForAXChildren)
(WebKit::WebAutomationSession::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSession::getAccessibilityPropertiesForAccessibilityNode):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:
* Source/WebKit/UIProcess/WebPageProxy.h
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForAccessibilityNode):
(WebKit::WebAutomationSessionProxy::getAccessibilityObjectForAXNode)
(WebAutomationSessionProxy::ComputedAXProperties getComputedAccessibilityProperties)
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
* Source/WebKit/Scripts/webkit/messages.py
* Source/WebCore/accessibility/AXObjectCache.h
rahimabdi pushed a commit to rahimabdi/WebKit that referenced this pull request Jul 1, 2026
…ccessibilityPropertiesForAccessibilityNode commands

https://bugs.webkit.org/show_bug.cgi?id=299508
rdar://161303091

Reviewed by NOBODY (OOPS!).

This patch implements two new WebDriver automation commands used to support more robust WPT accessibility testing:
- GetAccessibilityPropertiesForElement
- GetAccessibilityPropertiesForAccessibilityNode

For this initial implementation, test_driver.get_accessibility_properties...() will return an accessibility property bag
containing the following computed properties:
- accessibilityNodeId
- role
- label
- checked
- pressed
- children (array of serialized AXIDs)
- parent (serialized AXID)

As these new WebDriver commands are test-only interfaces, there's been in-depth discussion around how to treat computed
AX properties when a property is missing and supported, or present & unsupported; see WICG/aom#203.

Some additional resources:
- WebDriver PR for the new commands: w3c/webdriver#1960
- ARIA PR for the initial set of computed accessibility properties, and treatment of undefined/missing/unsupported values: w3c/aria#2800.

At a high level, the WebDriver client (i.e., Web Platform Tests' testdriver.js) initiates these new commands
which is then dispatched to the UI Process (WebAutomationSession). The WebAutomationSession then parses the payload
and extracts the protocol-specific element or accessibility node, after which it identifies the target (WebPageProxy)
which invokes an asynchronous IPC message to the corresponding Web Process. Note that GetAccessibilityPropertiesForElement
uses the same DOM node/frame-based approach as many other WebDriver commands however, GetAccessibilityPropertiesForAXNode does
not require frame-based process routing (it retrieves computed accessibility properties using the page's axObjectCache, rather
than a specific frame tied to a DOM node); thus, GetAccessibilityPropertiesForAccessibilityNode has a different message signature.

Note that to fully support these new WebDriver commands, corresponding WebDriver HTTP endpoints must be implemented in Webdriver for Safari (safaridriver):
- session/{session_id}/element/{elId}/accessibilityproperties: Returns accessibility properties for DOM element {elId}
- session/{session_id}/accessibility/<accessibility node id>/properties/{accessibility node id}: Returns accessibility properties for accessibility node {accessibility node id}

Due to the existence of two AccessibilityProperties protocol object definitions, documentation for each has been updated:
- Source/WebKit/UIProcess/Automation/Automation.json — specification conformance and interoperability testing
- Source/JavaScriptCore/inspector/protocol/DOM.json — Web Inspector DOM element inspection

As an unrelated small fix, the return type for GetComputedLabel (WebAutomationSessionProxy IPC message) incorrectly names the first string parameter as "role"
instead of "label" so this patch also corrects the tuple to return (label, errorType).

* LayoutTests/resources/testdriver-vendor.js:
(window.test_driver_internal.get_accessibility_properties_for_element):
(window.test_driver_internal.get_accessibility_properties_for_accessibility_node):
* Source/JavaScriptCore/inspector/protocol/DOM.json
* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(Ref<JSON::ArrayOf<String>> buildArrayForAXChildren)
(WebKit::WebAutomationSession::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSession::getAccessibilityPropertiesForAccessibilityNode):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:
* Source/WebKit/UIProcess/WebPageProxy.h
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForAccessibilityNode):
(WebKit::WebAutomationSessionProxy::getAccessibilityObjectForAXNode)
(WebAutomationSessionProxy::ComputedAXProperties getComputedAccessibilityProperties)
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
* Source/WebKit/Scripts/webkit/messages.py
* Source/WebCore/accessibility/AXObjectCache.h
rahimabdi pushed a commit to rahimabdi/WebKit that referenced this pull request Jul 1, 2026
…ccessibilityPropertiesForAccessibilityNode commands

https://bugs.webkit.org/show_bug.cgi?id=299508
rdar://161303091

Reviewed by NOBODY (OOPS!).

This patch implements two new WebDriver automation commands used to support more robust WPT accessibility testing:
- GetAccessibilityPropertiesForElement
- GetAccessibilityPropertiesForAccessibilityNode

For this initial implementation, test_driver.get_accessibility_properties...() will return an accessibility property bag
containing the following computed properties:
- accessibilityNodeId
- role
- label
- checked
- pressed
- children (array of serialized AXIDs)
- parent (serialized AXID)

As these new WebDriver commands are test-only interfaces, there's been in-depth discussion around how to treat computed
AX properties when a property is missing and supported, or present & unsupported; see WICG/aom#203.

Some additional resources:
- WebDriver PR for the new commands: w3c/webdriver#1960
- ARIA PR for the initial set of computed accessibility properties, and treatment of undefined/missing/unsupported values: w3c/aria#2800.

At a high level, the WebDriver client (i.e., Web Platform Tests' testdriver.js) initiates these new commands
which is then dispatched to the UI Process (WebAutomationSession). The WebAutomationSession then parses the payload
and extracts the protocol-specific element or accessibility node, after which it identifies the target (WebPageProxy)
which invokes an asynchronous IPC message to the corresponding Web Process. Note that GetAccessibilityPropertiesForElement
uses the same DOM node/frame-based approach as many other WebDriver commands however, GetAccessibilityPropertiesForAXNode does
not require frame-based process routing (it retrieves computed accessibility properties using the page's axObjectCache, rather
than a specific frame tied to a DOM node); thus, GetAccessibilityPropertiesForAccessibilityNode has a different message signature.

Note that to fully support these new WebDriver commands, corresponding WebDriver HTTP endpoints must be implemented in Webdriver for Safari (safaridriver):
- session/{session_id}/element/{elId}/accessibilityproperties: Returns accessibility properties for DOM element {elId}
- session/{session_id}/accessibility/<accessibility node id>/properties/{accessibility node id}: Returns accessibility properties for accessibility node {accessibility node id}

Due to the existence of two AccessibilityProperties protocol object definitions, documentation for each has been updated:
- Source/WebKit/UIProcess/Automation/Automation.json — specification conformance and interoperability testing
- Source/JavaScriptCore/inspector/protocol/DOM.json — Web Inspector DOM element inspection

As an unrelated small fix, the return type for GetComputedLabel (WebAutomationSessionProxy IPC message) incorrectly names the first string parameter as "role"
instead of "label" so this patch also corrects the tuple to return (label, errorType).

* LayoutTests/resources/testdriver-vendor.js:
(window.test_driver_internal.get_accessibility_properties_for_element):
(window.test_driver_internal.get_accessibility_properties_for_accessibility_node):
* Source/JavaScriptCore/inspector/protocol/DOM.json
* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(Ref<JSON::ArrayOf<String>> buildArrayForAXChildren)
(WebKit::WebAutomationSession::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSession::getAccessibilityPropertiesForAccessibilityNode):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:
* Source/WebKit/UIProcess/WebPageProxy.h
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForAccessibilityNode):
(WebKit::WebAutomationSessionProxy::getAccessibilityObjectForAXNode)
(WebAutomationSessionProxy::ComputedAXProperties getComputedAccessibilityProperties)
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
* Source/WebKit/Scripts/webkit/messages.py
* Source/WebCore/accessibility/AXObjectCache.h
rahimabdi pushed a commit to rahimabdi/WebKit that referenced this pull request Jul 6, 2026
…ccessibilityPropertiesForAccessibilityNode commands

https://bugs.webkit.org/show_bug.cgi?id=299508
rdar://161303091

Reviewed by NOBODY (OOPS!).

This patch implements two new WebDriver automation commands used to support more robust WPT accessibility testing:
- GetAccessibilityPropertiesForElement
- GetAccessibilityPropertiesForAccessibilityNode

For this initial implementation, test_driver.get_accessibility_properties...() will return an accessibility property bag
containing the following computed properties:
- accessibilityNodeId
- role
- label
- checked
- pressed
- children (array of serialized AXIDs)
- parent (serialized AXID)

As these new WebDriver commands are test-only interfaces, there's been in-depth discussion around how to treat computed
AX properties when a property is missing and supported, or present & unsupported; see WICG/aom#203.

Some additional resources:
- WebDriver PR for the new commands: w3c/webdriver#1960
- ARIA PR for the initial set of computed accessibility properties, and treatment of undefined/missing/unsupported values: w3c/aria#2800.

At a high level, the WebDriver client (i.e., Web Platform Tests' testdriver.js) initiates these new commands
which is then dispatched to the UI Process (WebAutomationSession). The WebAutomationSession then parses the payload
and extracts the protocol-specific element or accessibility node, after which it identifies the target (WebPageProxy)
which invokes an asynchronous IPC message to the corresponding Web Process. Note that GetAccessibilityPropertiesForElement
uses the same DOM node/frame-based approach as many other WebDriver commands however, GetAccessibilityPropertiesForAXNode does
not require frame-based process routing (it retrieves computed accessibility properties using the page's axObjectCache, rather
than a specific frame tied to a DOM node); thus, GetAccessibilityPropertiesForAccessibilityNode has a different message signature.

Note that to fully support these new WebDriver commands, corresponding WebDriver HTTP endpoints must be implemented in Webdriver for Safari (safaridriver):
- session/{session_id}/element/{elId}/accessibilityproperties: Returns accessibility properties for DOM element {elId}
- session/{session_id}/accessibility/<accessibility node id>/properties/{accessibility node id}: Returns accessibility properties for accessibility node {accessibility node id}

Due to the existence of two AccessibilityProperties protocol object definitions, documentation for each has been updated:
- Source/WebKit/UIProcess/Automation/Automation.json — specification conformance and interoperability testing
- Source/JavaScriptCore/inspector/protocol/DOM.json — Web Inspector DOM element inspection

As an unrelated small fix, the return type for GetComputedLabel (WebAutomationSessionProxy IPC message) incorrectly names the first string parameter as "role"
instead of "label" so this patch also corrects the tuple to return (label, errorType).

* LayoutTests/resources/testdriver-vendor.js:
(window.test_driver_internal.get_accessibility_properties_for_element):
(window.test_driver_internal.get_accessibility_properties_for_accessibility_node):
* Source/JavaScriptCore/inspector/protocol/DOM.json
* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(Ref<JSON::ArrayOf<String>> buildArrayForAXChildren)
(WebKit::WebAutomationSession::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSession::getAccessibilityPropertiesForAccessibilityNode):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:
* Source/WebKit/UIProcess/WebPageProxy.h
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForAccessibilityNode):
(WebKit::WebAutomationSessionProxy::getAccessibilityObjectForAXNode)
(WebAutomationSessionProxy::ComputedAXProperties getComputedAccessibilityProperties)
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
* Source/WebKit/Scripts/webkit/messages.py
* Source/WebCore/accessibility/AXObjectCache.h
rahimabdi pushed a commit to rahimabdi/WebKit that referenced this pull request Jul 6, 2026
…ccessibilityPropertiesForAccessibilityNode commands

https://bugs.webkit.org/show_bug.cgi?id=299508
rdar://161303091

Reviewed by NOBODY (OOPS!).

This patch implements two new WebDriver automation commands used to support more robust WPT accessibility testing:
- GetAccessibilityPropertiesForElement
- GetAccessibilityPropertiesForAccessibilityNode

For this initial implementation, test_driver.get_accessibility_properties...() will return an accessibility property bag
containing the following computed properties:
- accessibilityNodeId
- role
- label
- checked
- pressed
- children (array of serialized AXIDs)
- parent (serialized AXID)

As these new WebDriver commands are test-only interfaces, there's been in-depth discussion around how to treat computed
AX properties when a property is missing and supported, or present & unsupported; see WICG/aom#203.

Some additional resources:
- WebDriver PR for the new commands: w3c/webdriver#1960
- ARIA PR for the initial set of computed accessibility properties, and treatment of undefined/missing/unsupported values: w3c/aria#2800.

At a high level, the WebDriver client (i.e., Web Platform Tests' testdriver.js) initiates these new commands
which is then dispatched to the UI Process (WebAutomationSession). The WebAutomationSession then parses the payload
and extracts the protocol-specific element or accessibility node, after which it identifies the target (WebPageProxy)
which invokes an asynchronous IPC message to the corresponding Web Process. Note that GetAccessibilityPropertiesForElement
uses the same DOM node/frame-based approach as many other WebDriver commands however, GetAccessibilityPropertiesForAXNode does
not require frame-based process routing (it retrieves computed accessibility properties using the page's axObjectCache, rather
than a specific frame tied to a DOM node); thus, GetAccessibilityPropertiesForAccessibilityNode has a different message signature.

Note that to fully support these new WebDriver commands, corresponding WebDriver HTTP endpoints must be implemented in Webdriver for Safari (safaridriver):
- session/{session_id}/element/{elId}/accessibilityproperties: Returns accessibility properties for DOM element {elId}
- session/{session_id}/accessibility/<accessibility node id>/properties/{accessibility node id}: Returns accessibility properties for accessibility node {accessibility node id}

Due to the existence of two AccessibilityProperties protocol object definitions, documentation for each has been updated:
- Source/WebKit/UIProcess/Automation/Automation.json — specification conformance and interoperability testing
- Source/JavaScriptCore/inspector/protocol/DOM.json — Web Inspector DOM element inspection

As an unrelated small fix, the return type for GetComputedLabel (WebAutomationSessionProxy IPC message) incorrectly names the first string parameter as "role"
instead of "label" so this patch also corrects the tuple to return (label, errorType).

* LayoutTests/resources/testdriver-vendor.js:
(window.test_driver_internal.get_accessibility_properties_for_element):
(window.test_driver_internal.get_accessibility_properties_for_accessibility_node):
* Source/JavaScriptCore/inspector/protocol/DOM.json
* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(Ref<JSON::ArrayOf<String>> buildArrayForAXChildren)
(WebKit::WebAutomationSession::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSession::getAccessibilityPropertiesForAccessibilityNode):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:
* Source/WebKit/UIProcess/WebPageProxy.h
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForAccessibilityNode):
(WebKit::WebAutomationSessionProxy::getAccessibilityObjectForAXNode)
(WebAutomationSessionProxy::ComputedAXProperties getComputedAccessibilityProperties)
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
* Source/WebKit/Scripts/webkit/messages.py
* Source/WebCore/accessibility/AXObjectCache.h
rahimabdi pushed a commit to rahimabdi/WebKit that referenced this pull request Jul 6, 2026
…ccessibilityPropertiesForAccessibilityNode commands

https://bugs.webkit.org/show_bug.cgi?id=299508
rdar://161303091

Reviewed by NOBODY (OOPS!).

This patch implements two new WebDriver automation commands used to support more robust WPT accessibility testing:
- GetAccessibilityPropertiesForElement
- GetAccessibilityPropertiesForAccessibilityNode

For this initial implementation, test_driver.get_accessibility_properties...() will return an accessibility property bag
containing the following computed properties:
- accessibilityNodeId
- role
- label
- checked
- pressed
- children (array of serialized AXIDs)
- parent (serialized AXID)

As these new WebDriver commands are test-only interfaces, there's been in-depth discussion around how to treat computed
AX properties when a property is missing and supported, or present & unsupported; see WICG/aom#203.

Some additional resources:
- WebDriver PR for the new commands: w3c/webdriver#1960
- ARIA PR for the initial set of computed accessibility properties, and treatment of undefined/missing/unsupported values: w3c/aria#2800.

At a high level, the WebDriver client (i.e., Web Platform Tests' testdriver.js) initiates these new commands
which is then dispatched to the UI Process (WebAutomationSession). The WebAutomationSession then parses the payload
and extracts the protocol-specific element or accessibility node, after which it identifies the target (WebPageProxy)
which invokes an asynchronous IPC message to the corresponding Web Process. Note that GetAccessibilityPropertiesForElement
uses the same DOM node/frame-based approach as many other WebDriver commands however, GetAccessibilityPropertiesForAXNode does
not require frame-based process routing (it retrieves computed accessibility properties using the page's axObjectCache, rather
than a specific frame tied to a DOM node); thus, GetAccessibilityPropertiesForAccessibilityNode has a different message signature.

Note that to fully support these new WebDriver commands, corresponding WebDriver HTTP endpoints must be implemented in Webdriver for Safari (safaridriver):
- session/{session_id}/element/{elId}/accessibilityproperties: Returns accessibility properties for DOM element {elId}
- session/{session_id}/accessibility/<accessibility node id>/properties/{accessibility node id}: Returns accessibility properties for accessibility node {accessibility node id}

Due to the existence of two AccessibilityProperties protocol object definitions, documentation for each has been updated:
- Source/WebKit/UIProcess/Automation/Automation.json — specification conformance and interoperability testing
- Source/JavaScriptCore/inspector/protocol/DOM.json — Web Inspector DOM element inspection

As an unrelated small fix, the return type for GetComputedLabel (WebAutomationSessionProxy IPC message) incorrectly names the first string parameter as "role"
instead of "label" so this patch also corrects the tuple to return (label, errorType).

* LayoutTests/resources/testdriver-vendor.js:
(window.test_driver_internal.get_accessibility_properties_for_element):
(window.test_driver_internal.get_accessibility_properties_for_accessibility_node):
* Source/JavaScriptCore/inspector/protocol/DOM.json
* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(Ref<JSON::ArrayOf<String>> buildArrayForAXChildren)
(WebKit::WebAutomationSession::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSession::getAccessibilityPropertiesForAccessibilityNode):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:
* Source/WebKit/UIProcess/WebPageProxy.h
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForAccessibilityNode):
(WebKit::WebAutomationSessionProxy::getAccessibilityObjectForAXNode)
(WebAutomationSessionProxy::ComputedAXProperties getComputedAccessibilityProperties)
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
* Source/WebKit/Scripts/webkit/messages.py
* Source/WebCore/accessibility/AXObjectCache.h
rahimabdi pushed a commit to rahimabdi/WebKit that referenced this pull request Jul 6, 2026
…ccessibilityPropertiesForAccessibilityNode commands

https://bugs.webkit.org/show_bug.cgi?id=299508
rdar://161303091

Reviewed by NOBODY (OOPS!).

This patch implements two new WebDriver automation commands used to support more robust WPT accessibility testing:
- GetAccessibilityPropertiesForElement
- GetAccessibilityPropertiesForAccessibilityNode

For this initial implementation, test_driver.get_accessibility_properties...() will return an accessibility property bag
containing the following computed properties:
- accessibilityNodeId
- role
- label
- checked
- pressed
- children (array of serialized AXIDs)
- parent (serialized AXID)

As these new WebDriver commands are test-only interfaces, there's been in-depth discussion around how to treat computed
AX properties when a property is missing and supported, or present & unsupported; see WICG/aom#203.

Some additional resources:
- WebDriver PR for the new commands: w3c/webdriver#1960
- ARIA PR for the initial set of computed accessibility properties, and treatment of undefined/missing/unsupported values: w3c/aria#2800.

At a high level, the WebDriver client (i.e., Web Platform Tests' testdriver.js) initiates these new commands
which is then dispatched to the UI Process (WebAutomationSession). The WebAutomationSession then parses the payload
and extracts the protocol-specific element or accessibility node, after which it identifies the target (WebPageProxy)
which invokes an asynchronous IPC message to the corresponding Web Process. Note that GetAccessibilityPropertiesForElement
uses the same DOM node/frame-based approach as many other WebDriver commands however, GetAccessibilityPropertiesForAXNode does
not require frame-based process routing (it retrieves computed accessibility properties using the page's axObjectCache, rather
than a specific frame tied to a DOM node); thus, GetAccessibilityPropertiesForAccessibilityNode has a different message signature.

Note that to fully support these new WebDriver commands, corresponding WebDriver HTTP endpoints must be implemented in Webdriver for Safari (safaridriver):
- session/{session_id}/element/{elId}/accessibilityproperties: Returns accessibility properties for DOM element {elId}
- session/{session_id}/accessibility/<accessibility node id>/properties/{accessibility node id}: Returns accessibility properties for accessibility node {accessibility node id}

Due to the existence of two AccessibilityProperties protocol object definitions, documentation for each has been updated:
- Source/WebKit/UIProcess/Automation/Automation.json — specification conformance and interoperability testing
- Source/JavaScriptCore/inspector/protocol/DOM.json — Web Inspector DOM element inspection

As an unrelated small fix, the return type for GetComputedLabel (WebAutomationSessionProxy IPC message) incorrectly names the first string parameter as "role"
instead of "label" so this patch also corrects the tuple to return (label, errorType).

* LayoutTests/resources/testdriver-vendor.js:
(window.test_driver_internal.get_accessibility_properties_for_element):
(window.test_driver_internal.get_accessibility_properties_for_accessibility_node):
* Source/JavaScriptCore/inspector/protocol/DOM.json
* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(Ref<JSON::ArrayOf<String>> buildArrayForAXChildren)
(WebKit::WebAutomationSession::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSession::getAccessibilityPropertiesForAccessibilityNode):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:
* Source/WebKit/UIProcess/WebPageProxy.h
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForAccessibilityNode):
(WebKit::WebAutomationSessionProxy::getAccessibilityObjectForAXNode)
(WebAutomationSessionProxy::ComputedAXProperties getComputedAccessibilityProperties)
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
* Source/WebKit/Scripts/webkit/messages.py
* Source/WebCore/accessibility/AXObjectCache.h
rahimabdi pushed a commit to rahimabdi/WebKit that referenced this pull request Jul 6, 2026
…ccessibilityPropertiesForAccessibilityNode commands

https://bugs.webkit.org/show_bug.cgi?id=299508
rdar://161303091

Reviewed by NOBODY (OOPS!).

This patch implements two new WebDriver automation commands used to support more robust WPT accessibility testing:
- GetAccessibilityPropertiesForElement
- GetAccessibilityPropertiesForAccessibilityNode

For this initial implementation, test_driver.get_accessibility_properties...() will return an accessibility property bag
containing the following computed properties:
- accessibilityNodeId
- role
- label
- checked
- pressed
- children (array of serialized AXIDs)
- parent (serialized AXID)

As these new WebDriver commands are test-only interfaces, there's been in-depth discussion around how to treat computed
AX properties when a property is missing and supported, or present & unsupported; see WICG/aom#203.

Some additional resources:
- WebDriver PR for the new commands: w3c/webdriver#1960
- ARIA PR for the initial set of computed accessibility properties, and treatment of undefined/missing/unsupported values: w3c/aria#2800.

At a high level, the WebDriver client (i.e., Web Platform Tests' testdriver.js) initiates these new commands
which is then dispatched to the UI Process (WebAutomationSession). The WebAutomationSession then parses the payload
and extracts the protocol-specific element or accessibility node, after which it identifies the target (WebPageProxy)
which invokes an asynchronous IPC message to the corresponding Web Process. Note that GetAccessibilityPropertiesForElement
uses the same DOM node/frame-based approach as many other WebDriver commands however, GetAccessibilityPropertiesForAXNode does
not require frame-based process routing (it retrieves computed accessibility properties using the page's axObjectCache, rather
than a specific frame tied to a DOM node); thus, GetAccessibilityPropertiesForAccessibilityNode has a different message signature.

Note that to fully support these new WebDriver commands, corresponding WebDriver HTTP endpoints must be implemented in Webdriver for Safari (safaridriver):
- session/{session_id}/element/{elId}/accessibilityproperties: Returns accessibility properties for DOM element {elId}
- session/{session_id}/accessibility/<accessibility node id>/properties/{accessibility node id}: Returns accessibility properties for accessibility node {accessibility node id}

Due to the existence of two AccessibilityProperties protocol object definitions, documentation for each has been updated:
- Source/WebKit/UIProcess/Automation/Automation.json — specification conformance and interoperability testing
- Source/JavaScriptCore/inspector/protocol/DOM.json — Web Inspector DOM element inspection

As an unrelated small fix, the return type for GetComputedLabel (WebAutomationSessionProxy IPC message) incorrectly names the first string parameter as "role"
instead of "label" so this patch also corrects the tuple to return (label, errorType).

* LayoutTests/resources/testdriver-vendor.js:
(window.test_driver_internal.get_accessibility_properties_for_element):
(window.test_driver_internal.get_accessibility_properties_for_accessibility_node):
* Source/JavaScriptCore/inspector/protocol/DOM.json
* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(Ref<JSON::ArrayOf<String>> buildArrayForAXChildren)
(WebKit::WebAutomationSession::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSession::getAccessibilityPropertiesForAccessibilityNode):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:
* Source/WebKit/UIProcess/WebPageProxy.h
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForAccessibilityNode):
(WebKit::WebAutomationSessionProxy::getAccessibilityObjectForAXNode)
(WebAutomationSessionProxy::ComputedAXProperties getComputedAccessibilityProperties)
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
* Source/WebKit/Scripts/webkit/messages.py
* Source/WebCore/accessibility/AXObjectCache.h
rahimabdi pushed a commit to rahimabdi/WebKit that referenced this pull request Jul 6, 2026
…ccessibilityPropertiesForAccessibilityNode commands

https://bugs.webkit.org/show_bug.cgi?id=299508
rdar://161303091

Reviewed by NOBODY (OOPS!).

This patch implements two new WebDriver automation commands used to support more robust WPT accessibility testing:
- GetAccessibilityPropertiesForElement
- GetAccessibilityPropertiesForAccessibilityNode

For this initial implementation, test_driver.get_accessibility_properties...() will return an accessibility property bag
containing the following computed properties:
- accessibilityNodeId
- role
- label
- checked
- pressed
- children (array of serialized AXIDs)
- parent (serialized AXID)

As these new WebDriver commands are test-only interfaces, there's been in-depth discussion around how to treat computed
AX properties when a property is missing and supported, or present & unsupported; see WICG/aom#203.

Some additional resources:
- WebDriver PR for the new commands: w3c/webdriver#1960
- ARIA PR for the initial set of computed accessibility properties, and treatment of undefined/missing/unsupported values: w3c/aria#2800.

At a high level, the WebDriver client (i.e., Web Platform Tests' testdriver.js) initiates these new commands
which is then dispatched to the UI Process (WebAutomationSession). The WebAutomationSession then parses the payload
and extracts the protocol-specific element or accessibility node, after which it identifies the target (WebPageProxy)
which invokes an asynchronous IPC message to the corresponding Web Process. Note that GetAccessibilityPropertiesForElement
uses the same DOM node/frame-based approach as many other WebDriver commands however, GetAccessibilityPropertiesForAXNode does
not require frame-based process routing (it retrieves computed accessibility properties using the page's axObjectCache, rather
than a specific frame tied to a DOM node); thus, GetAccessibilityPropertiesForAccessibilityNode has a different message signature.

Note that to fully support these new WebDriver commands, corresponding WebDriver HTTP endpoints must be implemented in Webdriver for Safari (safaridriver):
- session/{session_id}/element/{elId}/accessibilityproperties: Returns accessibility properties for DOM element {elId}
- session/{session_id}/accessibility/<accessibility node id>/properties/{accessibility node id}: Returns accessibility properties for accessibility node {accessibility node id}

Due to the existence of two AccessibilityProperties protocol object definitions, documentation for each has been updated:
- Source/WebKit/UIProcess/Automation/Automation.json — specification conformance and interoperability testing
- Source/JavaScriptCore/inspector/protocol/DOM.json — Web Inspector DOM element inspection

As an unrelated small fix, the return type for GetComputedLabel (WebAutomationSessionProxy IPC message) incorrectly names the first string parameter as "role"
instead of "label" so this patch also corrects the tuple to return (label, errorType).

* LayoutTests/resources/testdriver-vendor.js:
(window.test_driver_internal.get_accessibility_properties_for_element):
(window.test_driver_internal.get_accessibility_properties_for_accessibility_node):
* Source/JavaScriptCore/inspector/protocol/DOM.json
* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(Ref<JSON::ArrayOf<String>> buildArrayForAXChildren)
(WebKit::WebAutomationSession::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSession::getAccessibilityPropertiesForAccessibilityNode):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:
* Source/WebKit/UIProcess/WebPageProxy.h
* Source/WebKit/UIProcess/WebPageProxy.cpp:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForElement):
(WebKit::WebAutomationSessionProxy::getAccessibilityPropertiesForAccessibilityNode):
(WebKit::WebAutomationSessionProxy::getAccessibilityObjectForAXNode)
(WebAutomationSessionProxy::ComputedAXProperties getComputedAccessibilityProperties)
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h:
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
* Source/WebKit/Scripts/webkit/messages.py
* Source/WebCore/accessibility/AXObjectCache.h

@rahimabdi rahimabdi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with some minor comments, thank you @spectranaut!

I noticed some additional properties that weren't discussed in initial browser implementations:

  • description
  • level
  • multiline
  • orientation
  • required
  • roledescription
  • selected

Also, parent/children appear to be missing.

Comment thread core-aam/index.html Outdated
Comment thread core-aam/index.html Outdated
<section id="computed_accessibility_properties">
<h2>Computed Accessibility Properties</h2>
<p>
The computed accessibility properties of an element are a set of platform independent key/value pairs of strings that represent the states and attributes of any <a href="#dfn-accessible-object" class="specref">accessible object</a> in the <a>accessibility tree</a>. The computed accessibility properties are used primarily for the purposes of developer tools, specification conformance, and interoperability testing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

represent the states and attributes

What might be the distinction between states and attribute? Thinking of the existing state vs. attribute vs. property potential confusion 😄

@spectranaut spectranaut Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omg! thank you for catching this, it should have been "states and properties" everywhere, not "states and attributes". But also, on closer look at the ARIA spec language, I think I can just say "attributes" instead of "states and properties" -- so I'll make that switch, which should make it easier to read.

Edit: I'm no longer sure I can just use attribute. I think attribute might be too confusable with the actual aria attribute in the DOM (https://dom.spec.whatwg.org/#concept-attribute) where as states and properties have things like default values for roles and there for might not have an HTML attribute set. So, I'm reverting to using "states and properties", but adding "ARIA states and properties" for most of them.

In the case where it's clear we are talking about a DOM attribute, I left attribute.

I'd appreciate you taking another look with this change, however!

Comment thread core-aam/index.html Outdated
</ol>
</aside>
<p>
When the state or property does not have a default value other than undefined, is not required on a given role, and is missing, undefined, or set to an invalid token, user agents MUST NOT include it in the computed accessibility properties. When a state or property has a default value other than undefined, is supported but not required on a given role, and is not mapped on any platforms, user agents MUST NOT include it in the computed accessibility properties. If the state or property with the previous conditions is mapped on one or more platforms, user agents MAY include it in the computed accessibility properties.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the state or property does not have a default value other than undefined, is not required on a given role, and is missing, undefined, or set to an invalid token, user agents MUST NOT include it in the computed accessibility properties.

Does this mean that the value would be null (or empty string)? If someone checks accProps.checked in such a scenario for example, what would be the value of checked since it's not included?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In terms of a JSON object, the key "checked" would simply not be in the JSON object. Does that make sense? If you are talking about a javascript object, there is no "checked" attribute, so "accProps.checked" would result in undefined.

Comment thread core-aam/index.html Outdated
The computed accessibility properties of an element are a set of platform independent key/value pairs of strings that represent the states and attributes of any <a href="#dfn-accessible-object" class="specref">accessible object</a> in the <a>accessibility tree</a>. The computed accessibility properties are used primarily for the purposes of developer tools, specification conformance, and interoperability testing.
</p>
<p>
Not all ARIA states and attributes will be surfaced in the computed accessibility properties. To see if a state or attribute should be surfaced, and the name of the key and it's expected value, check the "Computed Accessibility Property" row of the tables below. If a host language state or property maps to an ARIA state or property, use the key and value specified here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the spec made clearer that there is a one-to-many mapping between computed accessibility property and ARIA attribute? For example, for label, it maps to aria-label, aria-labelledby, title, etc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be more clear now that I've applied James Craig's suggestion: #2800 (comment)

Comment thread core-aam/index.html Outdated
<section id="computed_accessibility_properties">
<h2>Computed Accessibility Properties</h2>
<p>
The computed accessibility properties of an element are a set of platform independent key/value pairs of strings that represent the states and attributes of any <a href="#dfn-accessible-object" class="specref">accessible object</a> in the <a>accessibility tree</a>. The computed accessibility properties are used primarily for the purposes of developer tools, specification conformance, and interoperability testing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of a nit, but aren't the computed accessibility properties also used by browsers as the basis for building the platform-specific trees? (in addition to developer tools, specification conformance, and interoperability testing)

@spectranaut spectranaut Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm interesting point, it's true. I changed the wording here slightly with this reflection, from

The computed accessibility properties are used primarily for the purposes of developer tools, specification conformance, and interoperability testing.

To:

The computed accessibility properties are exposed primarily for the purposes of developer tools, specification conformance, and interoperability testing.

@cyns cyns left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks good! It's really helpful to have this layer documented. I added one small comment, ok with merging either way.

@github-actions
github-actions Bot temporarily deployed to pull request July 21, 2026 19:02 Inactive
@github-actions
github-actions Bot temporarily deployed to pull request July 21, 2026 19:32 Inactive
@spectranaut
spectranaut marked this pull request as draft July 21, 2026 20:17
@spectranaut

Copy link
Copy Markdown
Contributor Author

I've converted this to draft because I'm working on moving the definition of accessibilityID, parent and child here per webdriver reviewer's request: w3c/webdriver#1960 (comment)

@github-actions
github-actions Bot temporarily deployed to pull request July 22, 2026 18:12 Inactive
@spectranaut

Copy link
Copy Markdown
Contributor Author

Ok, @cookiecrook @janewman @rahimabdi @cyns - I'd really appreciate another look at this section: https://deploy-preview-2800--wai-aria.netlify.app/core-aam/index.html#computed_accessibility_properties

As mentioned above, the webdriver reviewer requested that the definition of these concepts be owned outside of webdriver, so that they can be referred to by webdriverBiDi as well. So here is my first attempt at doing that. I had to add a definition of "accessibility node" and "accessibility node ID" which I'm particularly unsure about, so review of those specifically would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants