[a11y] Fix accessibility click action on combo boxes [chromium/src : main]

0 views
Skip to first unread message

Aaron Moss (Gerrit)

unread,
May 11, 2026, 2:42:09 PM (23 hours ago) May 11
to Lucas Radaelli, Chromium LUCI CQ, (Julie)Jeongeun Kim, Kevin Babbitt, android-bu...@system.gserviceaccount.com, blink-rev...@chromium.org, blink-...@chromium.org, dtseng...@chromium.org, blink-rev...@chromium.org, francisjp...@google.com, nektar...@chromium.org, yuzo+...@chromium.org, lucasrada...@google.com, kyungjunle...@google.com, abigailbk...@google.com, josiah...@chromium.org
Attention needed from Lucas Radaelli

Aaron Moss voted and added 6 comments

Votes added by Aaron Moss

Commit-Queue+1

6 comments

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Aaron Moss . resolved

The test change I included here should fix the only failures from the dry-run on PS 4, but if you'd like to wait for the dry run on this PS to finish you're welcome to.

I did a bit of an odd thing here where the fix was to change the behaviour of `TextFieldInputType::AccessKeyAction()`, but I combined that with a refactor that unified (now) 4 of 6 identical subclass overrides into the base class behaviour in `InputTypeView`; if you'd like me to split the cleanup refactor into a separate CL I can.

File third_party/blink/renderer/core/html/forms/base_checkable_input_type.h
Line 66, Patchset 6 (Parent): void AccessKeyAction(SimulatedClickCreationScope creation_scope) final;
Aaron Moss . unresolved

The key issue for this bug was that the accessibility click path called `AccessKeyAction()` on its underlying element (reusing the `accesskey` keyboard shortcut attribute behaviour for the element, which momstly clicks the element, but has some useful special handling for, e.g. list box elements and hidden elements). [HTMLInputElement::AccessKeyAction()](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/forms/html_input_element.cc;drc=54af12075326fb3b52088fcf8c1a34d6fb264f65;l=806) forwards to the underlying [InputTypeView::AccessKeyAction()](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/forms/input_type_view.cc;drc=c83b80f441edc1c50de8d3977fa3feeb0ae96bc3;l=79).

The base `InputTypeView::AccessKeyAction()` previously only focused the element, but three of the six existing overloads did a "focus-then-click" with a TODO to merge their implementations into a common base-class, which is also the correct behaviour for the (previously un-overloaded) `TextFieldInputType::AccessKeyAction()`. Rather than add a fourth identical overload, I changed the `InputTypeView::AccessKeyAction()` base-class behaviour to "focus-then-click", removed the three now-redundant overloads, left the existing `HiddenInputType` do-nothing overload as-is, and added an overload for `MultipleFieldsTemporalInputTypeView::AccessKeyAction()` with the previous base-class behaviour.

File third_party/blink/renderer/core/html/forms/html_input_element.cc
Line 806, Patchset 2 (Parent):void HTMLInputElement::AccessKeyAction(
Aaron Moss . unresolved

This might not be the right place to make the change, I'd follow it in a level and possibly try to change one of the subclass overrides of [InputTypeView::AccessKeyAction()](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/forms/input_type_view.cc;l=79;drc=54af12075326fb3b52088fcf8c1a34d6fb264f65;bpv=1;bpt=1).

File third_party/blink/renderer/modules/accessibility/ax_object.cc
Line 7508, Patchset 1 (Parent): if (IsTextField())
Aaron Moss . unresolved

crrev.com/c/1388388 (2019) added this check to give TalkBack a way to focus `contenteditable` nodes, but it seems to block explicit "click" actions from ATs from actually clicking nodes (instead of just focusing them), so I've removed it.

Line 7533, Patchset 1 (Parent): // For most elements, AccessKeyAction triggers sending a simulated
Aaron Moss . unresolved

`AccessKeyAction()` is a handler for the (seldom-used) [`accesskey` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/accesskey), and is specifically overridden for [HTMLInputElement](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/forms/html_input_element.cc;drc=54af12075326fb3b52088fcf8c1a34d6fb264f65;l=806) to only focus the node rather than the default simulated click in [HTMLElement](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/html_element.cc;l=3354;drc=54af12075326fb3b52088fcf8c1a34d6fb264f65). Given that this is specifically for the "click" accessibility action, I tried to replace this call with `DispatchSimulatedClick()` in PS 1, but that broke some web tests for the `<select>` element, which depended on special handling for its child `<option>` elements.

File third_party/blink/web_tests/fast/forms/access-key-expected.txt
Line 16, Patchset 6 (Latest):4 input type text clicked
Aaron Moss . unresolved

The changes to this test file make the failed CQ tests from PS 4 pass. They seem to be within the test semantics as described in [fast/forms/access-key.html](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/fast/forms/access-key.html?q=fast%2Fforms%2Faccess-key.html) and match the intentional change made in this CL.

Open in Gerrit

Related details

Attention is currently required from:
  • 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: Ie49a1d8ed67958f8818414b0b78f1d1bae2061f6
Gerrit-Change-Number: 7829260
Gerrit-PatchSet: 6
Gerrit-Owner: Aaron Moss <aaro...@google.com>
Gerrit-Reviewer: Aaron Moss <aaro...@google.com>
Gerrit-Reviewer: Lucas Radaelli <lucasr...@google.com>
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: Lucas Radaelli <lucasr...@google.com>
Gerrit-Comment-Date: Mon, 11 May 2026 18:42:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Joey Arhar (Gerrit)

unread,
May 11, 2026, 3:14:03 PM (23 hours ago) May 11
to Aaron Moss, Lucas Radaelli, Chromium LUCI CQ, (Julie)Jeongeun Kim, Kevin Babbitt, android-bu...@system.gserviceaccount.com, blink-rev...@chromium.org, blink-...@chromium.org, dtseng...@chromium.org, blink-rev...@chromium.org, francisjp...@google.com, nektar...@chromium.org, yuzo+...@chromium.org, lucasrada...@google.com, kyungjunle...@google.com, abigailbk...@google.com, josiah...@chromium.org
Attention needed from Aaron Moss and Lucas Radaelli

Joey Arhar added 5 comments

Commit Message
Joey Arhar . unresolved

Could you add some context here to explain why clicking is better than just focusing?

File third_party/blink/renderer/core/html/forms/base_checkable_input_type.h
Line 66, Patchset 6 (Parent): void AccessKeyAction(SimulatedClickCreationScope creation_scope) final;
Aaron Moss . unresolved

The key issue for this bug was that the accessibility click path called `AccessKeyAction()` on its underlying element (reusing the `accesskey` keyboard shortcut attribute behaviour for the element, which momstly clicks the element, but has some useful special handling for, e.g. list box elements and hidden elements). [HTMLInputElement::AccessKeyAction()](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/forms/html_input_element.cc;drc=54af12075326fb3b52088fcf8c1a34d6fb264f65;l=806) forwards to the underlying [InputTypeView::AccessKeyAction()](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/forms/input_type_view.cc;drc=c83b80f441edc1c50de8d3977fa3feeb0ae96bc3;l=79).

The base `InputTypeView::AccessKeyAction()` previously only focused the element, but three of the six existing overloads did a "focus-then-click" with a TODO to merge their implementations into a common base-class, which is also the correct behaviour for the (previously un-overloaded) `TextFieldInputType::AccessKeyAction()`. Rather than add a fourth identical overload, I changed the `InputTypeView::AccessKeyAction()` base-class behaviour to "focus-then-click", removed the three now-redundant overloads, left the existing `HiddenInputType` do-nothing overload as-is, and added an overload for `MultipleFieldsTemporalInputTypeView::AccessKeyAction()` with the previous base-class behaviour.

Joey Arhar

I see, so did you add the MultipleFieldsTemporalInputTypeView because you know that those should be focused without being clicked, or just to make sure you didn't change the behavior on those elements?

I think some of this context would be helpful to put into the commit message.

File third_party/blink/renderer/core/html/forms/html_input_element.cc
Line 806, Patchset 2 (Parent):void HTMLInputElement::AccessKeyAction(
Aaron Moss . unresolved

This might not be the right place to make the change, I'd follow it in a level and possibly try to change one of the subclass overrides of [InputTypeView::AccessKeyAction()](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/forms/input_type_view.cc;l=79;drc=54af12075326fb3b52088fcf8c1a34d6fb264f65;bpv=1;bpt=1).

Joey Arhar

Looks like html_input_element.cc isn't being changed in the latest patchset anymore?

File third_party/blink/renderer/modules/accessibility/ax_object.cc
Aaron Moss . unresolved

crrev.com/c/1388388 (2019) added this check to give TalkBack a way to focus `contenteditable` nodes, but it seems to block explicit "click" actions from ATs from actually clicking nodes (instead of just focusing them), so I've removed it.

Joey Arhar

So does that break the fix that other patch made?

Line 7533, Patchset 1 (Parent): // For most elements, AccessKeyAction triggers sending a simulated
Aaron Moss . unresolved

`AccessKeyAction()` is a handler for the (seldom-used) [`accesskey` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/accesskey), and is specifically overridden for [HTMLInputElement](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/forms/html_input_element.cc;drc=54af12075326fb3b52088fcf8c1a34d6fb264f65;l=806) to only focus the node rather than the default simulated click in [HTMLElement](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/html_element.cc;l=3354;drc=54af12075326fb3b52088fcf8c1a34d6fb264f65). Given that this is specifically for the "click" accessibility action, I tried to replace this call with `DispatchSimulatedClick()` in PS 1, but that broke some web tests for the `<select>` element, which depended on special handling for its child `<option>` elements.

Joey Arhar

I see. Would it still be a lot more appealing to use dispatchsimulatedclick if we could fix the select/option stuff in another way?

Open in Gerrit

Related details

Attention is currently required from:
  • Aaron Moss
  • 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: Ie49a1d8ed67958f8818414b0b78f1d1bae2061f6
Gerrit-Change-Number: 7829260
Gerrit-PatchSet: 6
Gerrit-Owner: Aaron Moss <aaro...@google.com>
Gerrit-Reviewer: Aaron Moss <aaro...@google.com>
Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
Gerrit-Reviewer: Lucas Radaelli <lucasr...@google.com>
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: Aaron Moss <aaro...@google.com>
Gerrit-Attention: Lucas Radaelli <lucasr...@google.com>
Gerrit-Comment-Date: Mon, 11 May 2026 19:13:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Aaron Moss <aaro...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Aaron Moss (Gerrit)

unread,
May 11, 2026, 3:51:37 PM (22 hours ago) May 11
to Lucas Radaelli, Chromium LUCI CQ, (Julie)Jeongeun Kim, Kevin Babbitt, android-bu...@system.gserviceaccount.com, blink-rev...@chromium.org, blink-...@chromium.org, dtseng...@chromium.org, blink-rev...@chromium.org, francisjp...@google.com, nektar...@chromium.org, yuzo+...@chromium.org, lucasrada...@google.com, kyungjunle...@google.com, abigailbk...@google.com, josiah...@chromium.org
Attention needed from Joey Arhar and Lucas Radaelli

Aaron Moss voted and added 5 comments

Votes added by Aaron Moss

Commit-Queue+1

5 comments

Commit Message
File-level comment, Patchset 6:
Joey Arhar . resolved

Could you add some context here to explain why clicking is better than just focusing?

Aaron Moss

Done; the linked bug provides the specific details, but this is about more-closely aligning the behaviour of the "click" accessibility action with an actual click.

File third_party/blink/renderer/core/html/forms/base_checkable_input_type.h
Line 66, Patchset 6 (Parent): void AccessKeyAction(SimulatedClickCreationScope creation_scope) final;
Aaron Moss . unresolved

The key issue for this bug was that the accessibility click path called `AccessKeyAction()` on its underlying element (reusing the `accesskey` keyboard shortcut attribute behaviour for the element, which momstly clicks the element, but has some useful special handling for, e.g. list box elements and hidden elements). [HTMLInputElement::AccessKeyAction()](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/forms/html_input_element.cc;drc=54af12075326fb3b52088fcf8c1a34d6fb264f65;l=806) forwards to the underlying [InputTypeView::AccessKeyAction()](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/forms/input_type_view.cc;drc=c83b80f441edc1c50de8d3977fa3feeb0ae96bc3;l=79).

The base `InputTypeView::AccessKeyAction()` previously only focused the element, but three of the six existing overloads did a "focus-then-click" with a TODO to merge their implementations into a common base-class, which is also the correct behaviour for the (previously un-overloaded) `TextFieldInputType::AccessKeyAction()`. Rather than add a fourth identical overload, I changed the `InputTypeView::AccessKeyAction()` base-class behaviour to "focus-then-click", removed the three now-redundant overloads, left the existing `HiddenInputType` do-nothing overload as-is, and added an overload for `MultipleFieldsTemporalInputTypeView::AccessKeyAction()` with the previous base-class behaviour.

Joey Arhar

I see, so did you add the MultipleFieldsTemporalInputTypeView because you know that those should be focused without being clicked, or just to make sure you didn't change the behavior on those elements?

I think some of this context would be helpful to put into the commit message.

Aaron Moss

I added the MFTITV overload to keep the behaviour consistent with its previous behaviour (I could try dropping the overload and running another dry-run if you like, but I'd rather split the separate behaviour change out into a follow-up CL).

MFTITV isn't particularly-well documented, but the depth of discussion on crbug.com/40617194 suggests that a synthetic click might not be a correct solution.

I've also edited the commit message to include more of the what and why from upthread.

File third_party/blink/renderer/core/html/forms/html_input_element.cc
Line 806, Patchset 2 (Parent):void HTMLInputElement::AccessKeyAction(
Aaron Moss . resolved

This might not be the right place to make the change, I'd follow it in a level and possibly try to change one of the subclass overrides of [InputTypeView::AccessKeyAction()](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/forms/input_type_view.cc;l=79;drc=54af12075326fb3b52088fcf8c1a34d6fb264f65;bpv=1;bpt=1).

Joey Arhar

Looks like html_input_element.cc isn't being changed in the latest patchset anymore?

Aaron Moss

Oops, left this comment draft for myself on an earlier PS and forgot to delete it before I sent the CL for review, sorry.

File third_party/blink/renderer/modules/accessibility/ax_object.cc
Aaron Moss . unresolved

crrev.com/c/1388388 (2019) added this check to give TalkBack a way to focus `contenteditable` nodes, but it seems to block explicit "click" actions from ATs from actually clicking nodes (instead of just focusing them), so I've removed it.

Joey Arhar

So does that break the fix that other patch made?

Aaron Moss

Good catch, there's a regression in this patch vs. Canary, I'll set it back to WIP.

Line 7533, Patchset 1 (Parent): // For most elements, AccessKeyAction triggers sending a simulated
Aaron Moss . unresolved

`AccessKeyAction()` is a handler for the (seldom-used) [`accesskey` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/accesskey), and is specifically overridden for [HTMLInputElement](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/forms/html_input_element.cc;drc=54af12075326fb3b52088fcf8c1a34d6fb264f65;l=806) to only focus the node rather than the default simulated click in [HTMLElement](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/html_element.cc;l=3354;drc=54af12075326fb3b52088fcf8c1a34d6fb264f65). Given that this is specifically for the "click" accessibility action, I tried to replace this call with `DispatchSimulatedClick()` in PS 1, but that broke some web tests for the `<select>` element, which depended on special handling for its child `<option>` elements.

Joey Arhar

I see. Would it still be a lot more appealing to use dispatchsimulatedclick if we could fix the select/option stuff in another way?

Aaron Moss

The kind of things that the `AccessKeyAction` lets us do (e.g. click listbox elements that haven't been visually expanded) wouldn't work with `DispatchSimulatedClick()`, but "should they work?" is a valid question -- I'll consult the team, I think the key question is "is there a way to accomplish the same thing using any given AT?". I do think not overloading `AccessKeyAction()` is conceptually cleaner here, but a larger change to existing Chrome behaviour.

On the other hand, the "change `AccessKeyAction()` for text fields" approach broke substantially fewer tests, and I didn't actually see a way to make [accessibility/select-option-click.html](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/accessibility/select-option-click.html?q=select-option-click.html) (my representative failed test with `DispatchSimulatedClick()`) work with the simulated click approach.

Open in Gerrit

Related details

Attention is currently required from:
  • Joey Arhar
  • 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: Ie49a1d8ed67958f8818414b0b78f1d1bae2061f6
Gerrit-Change-Number: 7829260
Gerrit-PatchSet: 7
Gerrit-Owner: Aaron Moss <aaro...@google.com>
Gerrit-Reviewer: Aaron Moss <aaro...@google.com>
Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
Gerrit-Reviewer: Lucas Radaelli <lucasr...@google.com>
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: Joey Arhar <jar...@chromium.org>
Gerrit-Attention: Lucas Radaelli <lucasr...@google.com>
Gerrit-Comment-Date: Mon, 11 May 2026 19:51:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Joey Arhar <jar...@chromium.org>
Comment-In-Reply-To: Aaron Moss <aaro...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages