Add testdriver-vendor.js support for get_accessibility_properties_* [chromium/src : main]

0 views
Skip to first unread message

Valerie Young (Gerrit)

unread,
May 12, 2026, 7:57:09 PM (6 days ago) May 12
to David Tseng, Lucas Radaelli, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, (Julie)Jeongeun Kim, Kevin Babbitt, Raphael Kubo da Costa, abigailbk...@google.com, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, dtseng...@chromium.org, francisjp...@google.com, jmedle...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, lucasrada...@google.com, nektar...@chromium.org, yuzo+...@chromium.org
Attention needed from David Tseng and Lucas Radaelli

Valerie Young added 1 comment

Patchset-level comments
File-level comment, Patchset 10 (Latest):
Valerie Young . resolved

Hi David and Lucas, could you take a look at this CL?

Open in Gerrit

Related details

Attention is currently required from:
  • David Tseng
  • Lucas Radaelli
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I47646188b848fde4fabf01dc423c9811b34b8514
Gerrit-Change-Number: 7823883
Gerrit-PatchSet: 10
Gerrit-Owner: Valerie Young <spect...@igalia.com>
Gerrit-Reviewer: David Tseng <dts...@chromium.org>
Gerrit-Reviewer: Lucas Radaelli <lucasr...@google.com>
Gerrit-Reviewer: Valerie Young <spect...@igalia.com>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: David Tseng <dts...@chromium.org>
Gerrit-Attention: Lucas Radaelli <lucasr...@google.com>
Gerrit-Comment-Date: Tue, 12 May 2026 23:56:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Lucas Radaelli (Gerrit)

unread,
May 13, 2026, 5:01:58 PM (6 days ago) May 13
to Valerie Young, David Tseng, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, (Julie)Jeongeun Kim, Kevin Babbitt, Raphael Kubo da Costa, abigailbk...@google.com, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, dtseng...@chromium.org, francisjp...@google.com, jmedle...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, lucasrada...@google.com, nektar...@chromium.org, yuzo+...@chromium.org
Attention needed from David Tseng and Valerie Young

Lucas Radaelli added 4 comments

Commit Message
Line 7, Patchset 10 (Latest):Add testdriver-vendor.js support for get_accessibility_properties_*
Lucas Radaelli . unresolved

nit: can you please add [a11y] tag?

File third_party/blink/renderer/modules/accessibility/testing/accessibility_properties.idl
Line 4, Patchset 10 (Latest):
Lucas Radaelli . unresolved

Can we please document this, or at least post a comment where this is coming from? (the explaner would be fine), or, if t is being finalized, just a TODO(xxxx) would be fine, just so that we can point out that this is coming from the spec.

File third_party/blink/renderer/modules/accessibility/testing/internals_accessibility.cc
Line 67, Patchset 10 (Latest): if (AXObject* parent = ax_object->ParentObject()) {
Lucas Radaelli . unresolved

nit: perhaps ParentObjectIncludedInTree?

Line 74, Patchset 10 (Latest): children_ids.push_back(child->AXObjectID());
Lucas Radaelli . unresolved

nit: this for loop might add children that are marked as ignored. Above we are skipping objects that are marked as ignored. Should we do the same here?

Open in Gerrit

Related details

Attention is currently required from:
  • David Tseng
  • Valerie Young
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I47646188b848fde4fabf01dc423c9811b34b8514
    Gerrit-Change-Number: 7823883
    Gerrit-PatchSet: 10
    Gerrit-Owner: Valerie Young <spect...@igalia.com>
    Gerrit-Reviewer: David Tseng <dts...@chromium.org>
    Gerrit-Reviewer: Lucas Radaelli <lucasr...@google.com>
    Gerrit-Reviewer: Valerie Young <spect...@igalia.com>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
    Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: David Tseng <dts...@chromium.org>
    Gerrit-Attention: Valerie Young <spect...@igalia.com>
    Gerrit-Comment-Date: Wed, 13 May 2026 21:01:40 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Valerie Young (Gerrit)

    unread,
    May 13, 2026, 6:05:32 PM (5 days ago) May 13
    to David Tseng, Lucas Radaelli, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, (Julie)Jeongeun Kim, Kevin Babbitt, Raphael Kubo da Costa, abigailbk...@google.com, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, dtseng...@chromium.org, francisjp...@google.com, jmedle...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, lucasrada...@google.com, nektar...@chromium.org, yuzo+...@chromium.org
    Attention needed from David Tseng and Lucas Radaelli

    Valerie Young added 5 comments

    Patchset-level comments
    File-level comment, Patchset 12 (Latest):
    Valerie Young . resolved

    Fixed some things and left comments on your comments, thanks Lucas!

    Commit Message
    Line 7, Patchset 10:Add testdriver-vendor.js support for get_accessibility_properties_*
    Lucas Radaelli . resolved

    nit: can you please add [a11y] tag?

    Valerie Young

    Done

    File third_party/blink/renderer/modules/accessibility/testing/accessibility_properties.idl
    Line 4, Patchset 10:
    Lucas Radaelli . resolved

    Can we please document this, or at least post a comment where this is coming from? (the explaner would be fine), or, if t is being finalized, just a TODO(xxxx) would be fine, just so that we can point out that this is coming from the spec.

    Valerie Young

    Done

    File third_party/blink/renderer/modules/accessibility/testing/internals_accessibility.cc
    Line 67, Patchset 10: if (AXObject* parent = ax_object->ParentObject()) {
    Lucas Radaelli . unresolved

    nit: perhaps ParentObjectIncludedInTree?

    Valerie Young

    Do you mean ParentObjectIfPresent? https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/accessibility/ax_object.h;l=1249


    This also returns ignored parents. If I wanted to get unignored parents, it would be ParentObjectUnignored().

    Line 74, Patchset 10: children_ids.push_back(child->AXObjectID());
    Lucas Radaelli . unresolved

    nit: this for loop might add children that are marked as ignored. Above we are skipping objects that are marked as ignored. Should we do the same here?

    Valerie Young

    Hmm I didn't mean to skip over objects that are ignored, in the current implementation, I decided to include ignored nodes -- although just now I just realize this returns an AccessibilityProperties with role set to "none" for two scenarios: one where the request object doesn't exist, and the other when it's ignored. This was the logic of the implementation of the webdriver GetComputedRole before I got here though.

    I don't actually know if I should return only unignored parents and children for this API. In the devtools, you can see ignored some ignored nodes, which inspired me to choose to return the tree with ignored nodes in it.

    But my mind is not made up on this, and I really love to hear your opinion -- whether to return the tree with or without ignored nodes. The ARIA specification has a concept of an accessibility tree that specifically does not include ignored nodes, so maybe that is the way we should go -- matching this ARIA concept: https://w3c.github.io/aria/#accessibility_tree

    Open in Gerrit

    Related details

    Attention is currently required from:
    • David Tseng
    • Lucas Radaelli
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I47646188b848fde4fabf01dc423c9811b34b8514
    Gerrit-Change-Number: 7823883
    Gerrit-PatchSet: 12
    Gerrit-Owner: Valerie Young <spect...@igalia.com>
    Gerrit-Reviewer: David Tseng <dts...@chromium.org>
    Gerrit-Reviewer: Lucas Radaelli <lucasr...@google.com>
    Gerrit-Reviewer: Valerie Young <spect...@igalia.com>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
    Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: David Tseng <dts...@chromium.org>
    Gerrit-Attention: Lucas Radaelli <lucasr...@google.com>
    Gerrit-Comment-Date: Wed, 13 May 2026 22:05:22 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Lucas Radaelli <lucasr...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Tseng (Gerrit)

    unread,
    May 13, 2026, 6:36:41 PM (5 days ago) May 13
    to Valerie Young, Lucas Radaelli, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, (Julie)Jeongeun Kim, Kevin Babbitt, Raphael Kubo da Costa, abigailbk...@google.com, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, dtseng...@chromium.org, francisjp...@google.com, jmedle...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, lucasrada...@google.com, nektar...@chromium.org, yuzo+...@chromium.org
    Attention needed from Lucas Radaelli and Valerie Young

    David Tseng added 5 comments

    File third_party/blink/renderer/modules/accessibility/testing/internals_accessibility.cc
    Line 29, Patchset 12 (Latest):AXObject* GetAXObject(const Element* element, int32_t accessibility_id) {
    David Tseng . unresolved

    Consider having the caller supply the Document here (otherwise, this call signature may be somewhat difficult to parse without peeking at the implementation).

    Line 33, Patchset 12 (Latest): ax_object_cache->UpdateAXForAllDocuments();
    David Tseng . unresolved

    nit: CHECK(ax_object_cache);
    (I haven't read the context around this file but assume we're expecting accessibility to already be enabled on the document).

    Line 39, Patchset 12 (Latest): return AXObject::AriaRoleName(ax::mojom::Role::kNone);
    David Tseng . unresolved

    Is there a need to distinguish between no object vs an ignored object?

    Line 76, Patchset 12 (Latest): props->setChildren(children_ids);
    David Tseng . unresolved

    SHould we set this if there are no children?

    Line 87, Patchset 12 (Latest): if (checked_state != ax::mojom::CheckedState::kNone) {
    David Tseng . unresolved

    I worry a bit about encoding attribute logic like this. Could we attempt to re-use what's already within AXObject for this purpose e.g. some of the tree serialization logic? Ultimately, this goes to using a full unserialized AXTree which encodes many of these rules, depending on exactly which attributes we're interested in.
    InspectorAccessibilityAgent (which I erroneously pointed you to for WPT) does something like this in order to surface data to dev tools.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Lucas Radaelli
    • Valerie Young
    Gerrit-Attention: Valerie Young <spect...@igalia.com>
    Gerrit-Attention: Lucas Radaelli <lucasr...@google.com>
    Gerrit-Comment-Date: Wed, 13 May 2026 22:36:31 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Lucas Radaelli (Gerrit)

    unread,
    May 14, 2026, 5:28:47 PM (4 days ago) May 14
    to Valerie Young, David Tseng, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, (Julie)Jeongeun Kim, Kevin Babbitt, Raphael Kubo da Costa, abigailbk...@google.com, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, dtseng...@chromium.org, francisjp...@google.com, jmedle...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, lucasrada...@google.com, nektar...@chromium.org, yuzo+...@chromium.org
    Attention needed from Valerie Young

    Lucas Radaelli added 2 comments

    File third_party/blink/renderer/modules/accessibility/testing/internals_accessibility.cc
    Line 67, Patchset 10: if (AXObject* parent = ax_object->ParentObject()) {
    Lucas Radaelli . resolved

    nit: perhaps ParentObjectIncludedInTree?

    Valerie Young

    Do you mean ParentObjectIfPresent? https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/accessibility/ax_object.h;l=1249


    This also returns ignored parents. If I wanted to get unignored parents, it would be ParentObjectUnignored().

    Lucas Radaelli

    will close this thread and we discuss ignored objects in the other thread, we can keep this one as it is.

    Line 74, Patchset 10: children_ids.push_back(child->AXObjectID());
    Lucas Radaelli . unresolved

    nit: this for loop might add children that are marked as ignored. Above we are skipping objects that are marked as ignored. Should we do the same here?

    Valerie Young

    Hmm I didn't mean to skip over objects that are ignored, in the current implementation, I decided to include ignored nodes -- although just now I just realize this returns an AccessibilityProperties with role set to "none" for two scenarios: one where the request object doesn't exist, and the other when it's ignored. This was the logic of the implementation of the webdriver GetComputedRole before I got here though.

    I don't actually know if I should return only unignored parents and children for this API. In the devtools, you can see ignored some ignored nodes, which inspired me to choose to return the tree with ignored nodes in it.

    But my mind is not made up on this, and I really love to hear your opinion -- whether to return the tree with or without ignored nodes. The ARIA specification has a concept of an accessibility tree that specifically does not include ignored nodes, so maybe that is the way we should go -- matching this ARIA concept: https://w3c.github.io/aria/#accessibility_tree

    Lucas Radaelli

    All right, so I will describe my mental model and we try to come up with something that make sense. I also don't know the right thing to do here, but we can start with what seems to be reasonable, and we come up with tests that stretch our understanding and we look at the results later.

    I will define ignored nodes. Ignored nodes are nodes that should not be included in the a11y tree (using blink terminology here). What makes things a bit harder is that there was a concept introduced in blink called Ignored but included in tree. There is even a helper method to do that.

    As the need suggests, ignored but included in tree are nodes that for some reason were ignored, but they need to be present in order to make the tree structure valid. This is the best explanation I can give at the moment.

    Without the test cases, it will be a bit hard to know at this point what makes sense or not. What about we continue as it is, but file a bug to add tests that **trigger ignored subtrees**, so we can check their expectations and see if they make sense?

    Without test examples I found hard to judge what we should do. Should we include d ignored but included in tree? Should we skip all? I don't know.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Valerie Young
    Gerrit-Comment-Date: Thu, 14 May 2026 21:28:36 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Valerie Young <spect...@igalia.com>
    Comment-In-Reply-To: Lucas Radaelli <lucasr...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Valerie Young (Gerrit)

    unread,
    May 14, 2026, 7:34:00 PM (4 days ago) May 14
    to David Tseng, Lucas Radaelli, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, (Julie)Jeongeun Kim, Kevin Babbitt, Raphael Kubo da Costa, abigailbk...@google.com, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, dtseng...@chromium.org, francisjp...@google.com, jmedle...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, lucasrada...@google.com, nektar...@chromium.org, yuzo+...@chromium.org
    Attention needed from David Tseng

    Valerie Young added 6 comments

    Patchset-level comments
    File-level comment, Patchset 13 (Latest):
    Valerie Young . resolved

    hi David! Fixed some things and replied to others, thanks!

    File third_party/blink/renderer/modules/accessibility/testing/internals_accessibility.cc
    Line 29, Patchset 12:AXObject* GetAXObject(const Element* element, int32_t accessibility_id) {
    David Tseng . resolved

    Consider having the caller supply the Document here (otherwise, this call signature may be somewhat difficult to parse without peeking at the implementation).

    Valerie Young

    good idea, thanks!

    Line 33, Patchset 12: ax_object_cache->UpdateAXForAllDocuments();
    David Tseng . resolved

    nit: CHECK(ax_object_cache);
    (I haven't read the context around this file but assume we're expecting accessibility to already be enabled on the document).

    Valerie Young

    Done

    Line 39, Patchset 12: return AXObject::AriaRoleName(ax::mojom::Role::kNone);
    David Tseng . unresolved

    Is there a need to distinguish between no object vs an ignored object?

    Valerie Young

    I would guess, eventually, yes, we need to distinguish. Right now I was just copying what was returned by getComputedRole, which is none in both cases.

    I think we might want to return "ignored: true" on ignored nodes. What exactly we return in these property bags it's not defined yet - it's currently being discussed in the comments of https://github.com/WICG/aom/issues/203#issuecomment-3963870273 and in the accessibility interop meetings. Any and all feedback welcome!

    Line 76, Patchset 12: props->setChildren(children_ids);
    David Tseng . resolved

    SHould we set this if there are no children?

    Valerie Young

    good catch.

    Line 87, Patchset 12: if (checked_state != ax::mojom::CheckedState::kNone) {
    David Tseng . unresolved

    I worry a bit about encoding attribute logic like this. Could we attempt to re-use what's already within AXObject for this purpose e.g. some of the tree serialization logic? Ultimately, this goes to using a full unserialized AXTree which encodes many of these rules, depending on exactly which attributes we're interested in.
    InspectorAccessibilityAgent (which I erroneously pointed you to for WPT) does something like this in order to surface data to dev tools.

    Valerie Young

    Unfortunately... we can't get around this specific check, whether checked means checked or pressed is calculated at the platform node level, for example: https://source.chromium.org/chromium/chromium/src/+/main:ui/accessibility/platform/ax_platform_node_auralinux.cc;l=4571?q=auralinux%20f:platform%20f:accessi&ss=chromium%2Fchromium%2Fsrc

    Btw I can't remember if we talked about it -- but the eventual webdriver endpoint will use the devtool protocol to get this data (like get computed role and get computed label already do) and the devtool code has this special logic in it, in inspector_type_builder_helper.cc, see: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/accessibility/inspector_type_builder_helper.cc;l=511;drc=44eee492c8b0a8ca17bb286a3826308a10ef0c3f

    But I think you are a right for other kinds of calculations that happen during serialization -- and the devtools code does start with the AXNodeData calculated from AXObject::Serialize. So that would probably be a better starting point for getting the rest of the properties we end up supporting here.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • David Tseng
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I47646188b848fde4fabf01dc423c9811b34b8514
    Gerrit-Change-Number: 7823883
    Gerrit-PatchSet: 13
    Gerrit-Owner: Valerie Young <spect...@igalia.com>
    Gerrit-Reviewer: David Tseng <dts...@chromium.org>
    Gerrit-Reviewer: Lucas Radaelli <lucasr...@google.com>
    Gerrit-Reviewer: Valerie Young <spect...@igalia.com>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
    Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: David Tseng <dts...@chromium.org>
    Gerrit-Comment-Date: Thu, 14 May 2026 23:33:46 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: David Tseng <dts...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Tseng (Gerrit)

    unread,
    May 18, 2026, 1:59:54 PM (15 hours ago) May 18
    to Valerie Young, Lucas Radaelli, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, (Julie)Jeongeun Kim, Kevin Babbitt, Raphael Kubo da Costa, abigailbk...@google.com, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, dtseng...@chromium.org, francisjp...@google.com, jmedle...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, lucasrada...@google.com, nektar...@chromium.org, yuzo+...@chromium.org
    Attention needed from Valerie Young

    David Tseng added 1 comment

    File third_party/blink/renderer/modules/accessibility/testing/internals_accessibility.cc
    Line 87, Patchset 12: if (checked_state != ax::mojom::CheckedState::kNone) {
    David Tseng . unresolved

    I worry a bit about encoding attribute logic like this. Could we attempt to re-use what's already within AXObject for this purpose e.g. some of the tree serialization logic? Ultimately, this goes to using a full unserialized AXTree which encodes many of these rules, depending on exactly which attributes we're interested in.
    InspectorAccessibilityAgent (which I erroneously pointed you to for WPT) does something like this in order to surface data to dev tools.

    Valerie Young

    Unfortunately... we can't get around this specific check, whether checked means checked or pressed is calculated at the platform node level, for example: https://source.chromium.org/chromium/chromium/src/+/main:ui/accessibility/platform/ax_platform_node_auralinux.cc;l=4571?q=auralinux%20f:platform%20f:accessi&ss=chromium%2Fchromium%2Fsrc

    Btw I can't remember if we talked about it -- but the eventual webdriver endpoint will use the devtool protocol to get this data (like get computed role and get computed label already do) and the devtool code has this special logic in it, in inspector_type_builder_helper.cc, see: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/accessibility/inspector_type_builder_helper.cc;l=511;drc=44eee492c8b0a8ca17bb286a3826308a10ef0c3f

    But I think you are a right for other kinds of calculations that happen during serialization -- and the devtools code does start with the AXNodeData calculated from AXObject::Serialize. So that would probably be a better starting point for getting the rest of the properties we end up supporting here.

    David Tseng

    Unfortunately... we can't get around this specific check, whether checked means checked or pressed is calculated at the platform node level, for example: https://source.chromium.org/chromium/chromium/src/+/main:ui/accessibility/platform/ax_platform_node_auralinux.cc;l=4571?q=auralinux%20f:platform%20f:accessi&ss=chromium%2Fchromium%2Fsrc

    Chrome uses aria-pressed in its role computation[1] and uses it in surfacing a generic checked state[2].

    If we wanted to more accurately encode this relationship, CHrome could separate the ideas of pressed and checked on serialization (pressed becomes a boolean, checked is still a enum true, false, mixed).
    Then, in this test layer, we would rely upon the pressed boolean directly.


    >
    > Btw I can't remember if we talked about it -- but the eventual webdriver endpoint will use the devtool protocol to get this data (like get computed role and get computed label already do) and the devtool code has this special logic in it, in inspector_type_builder_helper.cc, see: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/accessibility/inspector_type_builder_helper.cc;l=511;drc=44eee492c8b0a8ca17bb286a3826308a10ef0c3f
    >

    Ack!

    But I think you are a right for other kinds of calculations that happen during serialization -- and the devtools code does start with the AXNodeData calculated from AXObject::Serialize. So that would probably be a better starting point for getting the rest of the properties we end up supporting here.


    Yeah, I guess I'm generally not a fan of writing test only logic since it doesn't represent actual production behaviors (in this case it maybe does, but it's hard to tell). If we need to, maybe we could just flag it in some way via a comment.

    1. https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/accessibility/ax_object.cc;l=8498?q=ariapressed%20togglebutton%20ax_object.cc&ss=chromium
    2. https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/accessibility/ax_object.cc;l=3232?q=ariapressed%20togglebutton%20ax_object.cc&ss=chromium

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Valerie Young
    Gerrit-Attention: Valerie Young <spect...@igalia.com>
    Gerrit-Comment-Date: Mon, 18 May 2026 17:59:32 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: David Tseng <dts...@chromium.org>
    Comment-In-Reply-To: Valerie Young <spect...@igalia.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages