Skip to content

Add Computed Accessibility Properties section#2800

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

Add Computed Accessibility Properties section#2800
spectranaut wants to merge 14 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:

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

Link to added section computed accessibility properties for review

@netlify

netlify Bot commented May 28, 2026

Copy link
Copy Markdown

Deploy Preview for wai-aria ready!

Name Link
🔨 Latest commit dee5a49
🔍 Latest deploy log https://app.netlify.com/projects/wai-aria/deploys/6a270d9ff7c3eb0008ad7f53
😎 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
<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.

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.

I recalled ReSpec removed (or can be configured to remove) the empty rows. Am I mistaken?

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 just tried this, when the second column is empty, it does not remove the row, and I didn't see any settings related to this in the respec documentation.

I don't think I like the empty column look, so I'd like to stick to commenting out the row. Alternatively, we can write something like "Not specified." or "Intentionally not specified."

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:
Comment thread core-aam/index.html Outdated
@cookiecrook

cookiecrook commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

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!

Thoughts individually.

  • level: Should we add a clarifying note on some of the ones that have known correlate reconciliation with the host languages? For example, <h3> gets a level of 3 event though the ariaLevel IDL reflection should be… null for now unless it changes to Integer, and then would be 0 I think?
  • required: note to cross-ref html:required?
  • multiline: This is another we should reconsider. ARIA's choice to use textbox and textbox multiline instead of the existing input type=text and textarea was weird, especially in the context of contenteditable. IIRC, this was one I raised as a problem early as an ARIA editor, but [corp rep] didn't want to pay [AT dev] to change the implementation, so we left it in the spec. Had I been a more experienced editor at the time, I may have pushed back more firmly.
  • selected: We should discuss the name of this one in the context of ambiguity. "selected" can be confused with text range selection, so maybe we want to disambiguate the name further? Also, some implementations don't make as much of a distinction between checked, pressed, and selected in the API... I'm not opposed to this one as-is. Jut trying to anticipate future problems.

The rest look good to me. Thanks for trimming the big list down and proceeding more deliberately.

Co-authored-by: Lola <lolaodelola@gmail.com>
@github-actions github-actions Bot temporarily deployed to pull request June 8, 2026 16:39 Inactive
@spectranaut

spectranaut commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author
  • level: Should we add a clarifying note on some of the ones that have known correlate reconciliation with the host languages? For example, <h3> gets a level of 3 event though the ariaLevel IDL reflection should be… null for now unless it changes to Integer, and then would be 0 I think?

I don't think we need to make this note in the table... however, we could say something about this in the definition of computed accessibility properties, perhaps adding this after the first sentence (first sentence included):

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 accessible object in the accessibility tree. Many different things affect the value of the key in the accessibility tree, including but not limited to: defaults values for the state or attribute, default values when used on roles, host language states and attributes, and whether the host language overrides the ARIA values. These values do not always align with IDL reflection of the aria state or attribute.

No objections to keeping this in the list, right?

  • required: note to cross-ref html:required?

I don't think we should cross ref to html required, because html required already references Core-AAM: https://w3c.github.io/html-aam/#att-required

No objections to keeping this in the list, right?

  • multiline: This is another we should reconsider. ARIA's choice to use textbox and textbox multiline instead of the existing input type=text and textarea was weird, especially in the context of contenteditable. IIRC, this was one I raised as a problem early as an ARIA editor, but [corp rep] didn't want to pay [AT dev] to change the implementation, so we left it in the spec. Had I been a more experienced editor at the time, I may have pushed back more firmly.

Interesting history :) I'm fine with leaving this one out. But I think that means I need to update the example that uses it....

  • selected: We should discuss the name of this one in the context of ambiguity. "selected" can be confused with text range selection, so maybe we want to disambiguate the name further? Also, some implementations don't make as much of a distinction between checked, pressed, and selected in the API... I'm not opposed to this one as-is. Jut trying to anticipate future problems.

I would like to leave this one it, but I'm totally fine if you think we should drop it for now. Chrome does differentiate between select and checked/pressed, it's just checked/pressed that are combined, and we are already surfacing that information. Since we are already sorting out the checked/pressed problem, and we might as well deal with all three?

As for the name, if we wanted to do something different then selected... I'm not sure, the whole web does have this name collision, not just accessibility... I wonder how it's dealt with in other contexts? I feel like if we want to surface selected text we should say "selectedText".

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.

4 participants