[menu a11y] Expose checkable <menuitem>s as checkbox/radio roles [chromium/src : main]

0 views
Skip to first unread message

David Grogan (Gerrit)

unread,
Feb 10, 2026, 2:58:29 AM (yesterday) Feb 10
to David Grogan, David Baron, AyeAye, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Chromium LUCI CQ, abigailbk...@google.com, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, dtseng...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kyungjunle...@google.com, lucasrada...@google.com, nektar...@chromium.org, yuzo+...@chromium.org
Attention needed from David Baron

David Grogan added 3 comments

File content/test/content_test_bundle_data.filelist
Line 4996, Patchset 4:data/accessibility/html/meta-expected-mac.txt
David Grogan . unresolved

Is it ok that our menu* stuff doesn't run on other platforms?

File third_party/blink/renderer/modules/accessibility/ax_node_object.cc
Line 2183, Patchset 4: if (auto* menu_item = DynamicTo<HTMLMenuItemElement>(GetNode())) {
David Grogan . unresolved

This had to go before the `if (!GetLayoutObject())` check because the menuitems in third_party/blink/web_tests/accessibility/computed-role.html don't have a LayoutObject.

Line 2195, Patchset 4: DCHECK(EqualIgnoringASCIICase(checkable_type, keywords::kMultiple));
David Grogan . unresolved

Is this right? There are two mutually exclusive and exhaustive options?

Open in Gerrit

Related details

Attention is currently required from:
  • David Baron
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: Idb76e8b4532eace60b9c3f54a9f93d2c5e229e27
Gerrit-Change-Number: 7560775
Gerrit-PatchSet: 5
Gerrit-Owner: David Grogan <dgr...@chromium.org>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: David Grogan <dgr...@chromium.org>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Comment-Date: Tue, 10 Feb 2026 07:58:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

David Baron (Gerrit)

unread,
Feb 10, 2026, 3:35:53 PM (yesterday) Feb 10
to David Grogan, David Baron, AyeAye, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Chromium LUCI CQ, abigailbk...@google.com, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, dtseng...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kyungjunle...@google.com, lucasrada...@google.com, nektar...@chromium.org, yuzo+...@chromium.org
Attention needed from David Grogan

David Baron added 7 comments

Patchset-level comments
File-level comment, Patchset 5 (Latest):
David Baron . resolved

This mostly looks good, a few comments follow (half of which are responses to yours).

File content/test/content_test_bundle_data.filelist
Line 4996, Patchset 4:data/accessibility/html/meta-expected-mac.txt
David Grogan . unresolved

Is it ok that our menu* stuff doesn't run on other platforms?

David Baron

I think it probably is? I think in some cases it's probably OK to have *only* a `-blink.txt` and none of the platform-specific trees. But it might also be useful to have more coverage... it just requires generating all the baselines!

File content/test/data/accessibility/html/menuitem-checkbox.html
Line 15, Patchset 5 (Latest): </fieldset>
David Baron . unresolved

Maybe also throw in:

  • a fieldset without `checkable`, with the same menuitems (including `defaultchecked`)
  • the same pair of menuitems (one with `defaultchecked`) not in a `fieldset`?
File third_party/blink/renderer/modules/accessibility/ax_node_object.cc
Line 2183, Patchset 4: if (auto* menu_item = DynamicTo<HTMLMenuItemElement>(GetNode())) {
David Grogan . unresolved

This had to go before the `if (!GetLayoutObject())` check because the menuitems in third_party/blink/web_tests/accessibility/computed-role.html don't have a LayoutObject.

David Baron

Maybe it makes more sense to put this in `AXNodeObject::NativeRoleIgnoringAria()`? That has a decent number of element-type specific cases?

(I suspect it may make sense do the same for permission/menubar/menulist?)

Line 2195, Patchset 4: DCHECK(EqualIgnoringASCIICase(checkable_type, keywords::kMultiple));
David Grogan . unresolved

Is this right? There are two mutually exclusive and exhaustive options?

David Baron

Given that `IsCheckable()` is true, yes, there are two mutually exclusive options.

However, you shouldn't use `DCHECK()` to check that the markup is correct, which I think is what this `DCHECK()` is doing. I think it looks like most (but not all!) of the existing code treats any value other than "single" as multiple, which I think is fine.

File third_party/blink/renderer/modules/accessibility/ax_object.cc
Line 3232, Patchset 5 (Latest): // First test for native checked state
if (IsA<HTMLInputElement>(*node)) {
const auto* input = DynamicTo<HTMLInputElement>(node);
David Baron . unresolved
While you're here, better to do:
```suggestion
// First test for native checked state
if (const auto* input = DynamicTo<HTMLInputElement>(node)) {
```

(It does fewer `IsA` operations underneath, and it's shorter!)

File third_party/blink/web_tests/accessibility/computed-role.html
File-level comment, Patchset 5 (Latest):
David Baron . unresolved

I suspect this should be in a separate computed-role-menus.tentative.html test because it needs to be in a test with tentative in the name.

Open in Gerrit

Related details

Attention is currently required from:
  • David Grogan
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: Idb76e8b4532eace60b9c3f54a9f93d2c5e229e27
Gerrit-Change-Number: 7560775
Gerrit-PatchSet: 5
Gerrit-Owner: David Grogan <dgr...@chromium.org>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: David Grogan <dgr...@chromium.org>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
Gerrit-Attention: David Grogan <dgr...@chromium.org>
Gerrit-Comment-Date: Tue, 10 Feb 2026 20:35:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: David Grogan <dgr...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

David Grogan (Gerrit)

unread,
Feb 10, 2026, 6:27:07 PM (yesterday) Feb 10
to David Grogan, David Baron, AyeAye, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Chromium LUCI CQ, abigailbk...@google.com, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, dtseng...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kyungjunle...@google.com, lucasrada...@google.com, nektar...@chromium.org, yuzo+...@chromium.org
Attention needed from David Baron

David Grogan added 3 comments

File content/test/content_test_bundle_data.filelist
Line 4996, Patchset 4:data/accessibility/html/meta-expected-mac.txt
David Grogan . resolved

Is it ok that our menu* stuff doesn't run on other platforms?

David Baron

I think it probably is? I think in some cases it's probably OK to have *only* a `-blink.txt` and none of the platform-specific trees. But it might also be useful to have more coverage... it just requires generating all the baselines!

David Grogan

Acknowledged

File third_party/blink/renderer/modules/accessibility/ax_object.cc
Line 3232, Patchset 5: // First test for native checked state

if (IsA<HTMLInputElement>(*node)) {
const auto* input = DynamicTo<HTMLInputElement>(node);
David Baron . resolved
While you're here, better to do:
```suggestion
// First test for native checked state
if (const auto* input = DynamicTo<HTMLInputElement>(node)) {
```

(It does fewer `IsA` operations underneath, and it's shorter!)

David Grogan

Fix applied.

File third_party/blink/web_tests/accessibility/computed-role.html
David Baron . unresolved

I suspect this should be in a separate computed-role-menus.tentative.html test because it needs to be in a test with tentative in the name.

David Grogan

This file isn't in WPT, so 'tentative' doesn't really matter? But do you think I should put these tests in a tenative wpt instead of here?

Open in Gerrit

Related details

Attention is currently required from:
  • David Baron
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: Idb76e8b4532eace60b9c3f54a9f93d2c5e229e27
Gerrit-Change-Number: 7560775
Gerrit-PatchSet: 6
Gerrit-Owner: David Grogan <dgr...@chromium.org>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: David Grogan <dgr...@chromium.org>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Comment-Date: Tue, 10 Feb 2026 23:26:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: David Grogan <dgr...@chromium.org>
Comment-In-Reply-To: David Baron <dba...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

David Baron (Gerrit)

unread,
Feb 10, 2026, 10:19:43 PM (yesterday) Feb 10
to David Grogan, David Baron, AyeAye, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Chromium LUCI CQ, abigailbk...@google.com, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, dtseng...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kyungjunle...@google.com, lucasrada...@google.com, nektar...@chromium.org, yuzo+...@chromium.org
Attention needed from David Grogan

David Baron added 1 comment

File third_party/blink/web_tests/accessibility/computed-role.html
David Baron . unresolved

I suspect this should be in a separate computed-role-menus.tentative.html test because it needs to be in a test with tentative in the name.

David Grogan

This file isn't in WPT, so 'tentative' doesn't really matter? But do you think I should put these tests in a tenative wpt instead of here?

David Baron

Oops, never mind, I was thinking it was in WPT.

Open in Gerrit

Related details

Attention is currently required from:
  • David Grogan
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: Idb76e8b4532eace60b9c3f54a9f93d2c5e229e27
Gerrit-Change-Number: 7560775
Gerrit-PatchSet: 6
Gerrit-Owner: David Grogan <dgr...@chromium.org>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: David Grogan <dgr...@chromium.org>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
Gerrit-Attention: David Grogan <dgr...@chromium.org>
Gerrit-Comment-Date: Wed, 11 Feb 2026 03:19:37 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

David Grogan (Gerrit)

unread,
6:22 PM (5 hours ago) 6:22 PM
to David Grogan, David Baron, AyeAye, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, Chromium LUCI CQ, abigailbk...@google.com, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, dtseng...@chromium.org, francisjp...@google.com, josiah...@chromium.org, kyungjunle...@google.com, lucasrada...@google.com, nektar...@chromium.org, yuzo+...@chromium.org
Attention needed from David Baron

David Grogan added 4 comments

File content/test/data/accessibility/html/menuitem-checkbox.html
Line 15, Patchset 5: </fieldset>
David Baron . resolved

Maybe also throw in:

  • a fieldset without `checkable`, with the same menuitems (including `defaultchecked`)
  • the same pair of menuitems (one with `defaultchecked`) not in a `fieldset`?
David Grogan

Good idea, added. They even seem to work.

File third_party/blink/renderer/modules/accessibility/ax_node_object.cc
Line 2183, Patchset 4: if (auto* menu_item = DynamicTo<HTMLMenuItemElement>(GetNode())) {
David Grogan . resolved

This had to go before the `if (!GetLayoutObject())` check because the menuitems in third_party/blink/web_tests/accessibility/computed-role.html don't have a LayoutObject.

David Baron

Maybe it makes more sense to put this in `AXNodeObject::NativeRoleIgnoringAria()`? That has a decent number of element-type specific cases?

(I suspect it may make sense do the same for permission/menubar/menulist?)

David Grogan

Done

Line 2195, Patchset 4: DCHECK(EqualIgnoringASCIICase(checkable_type, keywords::kMultiple));
David Grogan . resolved

Is this right? There are two mutually exclusive and exhaustive options?

David Baron

Given that `IsCheckable()` is true, yes, there are two mutually exclusive options.

However, you shouldn't use `DCHECK()` to check that the markup is correct, which I think is what this `DCHECK()` is doing. I think it looks like most (but not all!) of the existing code treats any value other than "single" as multiple, which I think is fine.

David Grogan

However, you shouldn't use DCHECK() to check that the markup is correct, which I think is what this DCHECK() is doing

🤦

Done

File third_party/blink/web_tests/accessibility/computed-role.html
File-level comment, Patchset 5:
David Baron . resolved

I suspect this should be in a separate computed-role-menus.tentative.html test because it needs to be in a test with tentative in the name.

David Grogan

This file isn't in WPT, so 'tentative' doesn't really matter? But do you think I should put these tests in a tenative wpt instead of here?

David Baron

Oops, never mind, I was thinking it was in WPT.

David Grogan

Acknowledged

Open in Gerrit

Related details

Attention is currently required from:
  • David Baron
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: Idb76e8b4532eace60b9c3f54a9f93d2c5e229e27
    Gerrit-Change-Number: 7560775
    Gerrit-PatchSet: 7
    Gerrit-Owner: David Grogan <dgr...@chromium.org>
    Gerrit-Reviewer: David Baron <dba...@chromium.org>
    Gerrit-Reviewer: David Grogan <dgr...@chromium.org>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
    Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
    Gerrit-Attention: David Baron <dba...@chromium.org>
    Gerrit-Comment-Date: Wed, 11 Feb 2026 23:22:44 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages