Skip to content

Add Computed Accessibility Properties section#2800

Open
spectranaut wants to merge 12 commits into
mainfrom
computed-accessibility-properties
Open

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

Conversation

@spectranaut
Copy link
Copy Markdown
Contributor

@spectranaut spectranaut commented May 28, 2026

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

For the accessible node testing initiative: WICG/aom#203

https://deploy-preview-2800--wai-aria.netlify.app/core-aam/#computed_accessibility_properties

@netlify
Copy link
Copy Markdown

netlify Bot commented May 28, 2026

Deploy Preview for wai-aria ready!

Name Link
🔨 Latest commit dc9d5da
🔍 Latest deploy log https://app.netlify.com/projects/wai-aria/deploys/6a233cafe46f78000866c197
😎 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
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

🚀 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
<tr>
<th>Computed Accessibility Property</th>
<td>
Not mapped, or, referenced element should have `focus: true` ?
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.

does focus here mean focused or focusable?

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.

removed this one for now!

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.

Not removed? "referenced element should have focus: true"

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.

Nm... the comment was not obvious from prior diff I was looking at. Can the value be commented instead of the row?

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.

Oh is that what we discussed? Do you think it's less odd to have it table cell empty rather than the whole row missing? I suppose I don't have a strong opinion.

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.

Co-authored-by: James Teh <jamie@jantrid.net>
@github-actions github-actions Bot temporarily deployed to pull request June 5, 2026 18:47 Inactive
@github-actions github-actions Bot temporarily deployed to pull request June 5, 2026 21:18 Inactive
rahimabdi pushed a commit to rahimabdi/WebKit that referenced this pull request Jun 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:
- accessibilityId
- 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 & 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 — uWeb 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 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:
- accessibilityId
- 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 & 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 — uWeb 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 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:
- accessibilityId
- 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 & 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 — uWeb 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 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:
- accessibilityId
- 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 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:
- accessibilityId
- 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 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/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 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/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:
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.

3 participants