[Platform-provided behaviors] Accessibility integration [chromium/src : main]

0 views
Skip to first unread message

Ana Sollano Kim (Gerrit)

unread,
Apr 16, 2026, 8:31:21 PM (13 days ago) Apr 16
to Dan Clark, Mason Freed, Leo Lee, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, Kevin Babbitt, (Julie)Jeongeun Kim, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, dtseng...@chromium.org, nektar...@chromium.org, abigailbk...@google.com, blink-rev...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, lucasrada...@google.com, yuzo+...@chromium.org, blink-revie...@chromium.org, josiah...@chromium.org, francisjp...@google.com, kyungjunle...@google.com, blink-rev...@chromium.org
Attention needed from Ana Sollano Kim and Dan Clark

Ana Sollano Kim voted and added 1 comment

Votes added by Ana Sollano Kim

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Ana Sollano Kim . resolved

PTAL 😊

Open in Gerrit

Related details

Attention is currently required from:
  • Ana Sollano Kim
  • Dan Clark
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: I42fb2cf6a5717d67def045dc5a36a8e856f78bad
Gerrit-Change-Number: 7762931
Gerrit-PatchSet: 6
Gerrit-Owner: Ana Sollano Kim <anso...@microsoft.com>
Gerrit-Reviewer: Ana Sollano Kim <anso...@microsoft.com>
Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
Gerrit-Reviewer: Mason Freed <mas...@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: Leo Lee <leo...@microsoft.com>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
Gerrit-Attention: Ana Sollano Kim <anso...@microsoft.com>
Gerrit-Attention: Dan Clark <dan...@microsoft.com>
Gerrit-Comment-Date: Fri, 17 Apr 2026 00:31:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Jacques Newman (Gerrit)

unread,
Apr 27, 2026, 5:44:20 PM (2 days ago) Apr 27
to Ana Sollano Kim, Dan Clark, Mason Freed, Leo Lee, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, Kevin Babbitt, (Julie)Jeongeun Kim, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, dtseng...@chromium.org, nektar...@chromium.org, abigailbk...@google.com, blink-rev...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, lucasrada...@google.com, yuzo+...@chromium.org, blink-revie...@chromium.org, josiah...@chromium.org, francisjp...@google.com, kyungjunle...@google.com, blink-rev...@chromium.org
Attention needed from Ana Sollano Kim and Dan Clark

Jacques Newman added 2 comments

File third_party/blink/renderer/modules/accessibility/ax_node_object.cc
Line 2814, Patchset 7 (Latest): // Check for `HTMLSubmitButtonBehavior`'s default role.
Jacques Newman . unresolved

While we only have this one for now, the [explainer](https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/PlatformProvidedBehaviors/explainer.md#compatible-behaviors) lays out the ability for multiple behaviors with different roles and for conflict resolution:
> **Role conflict and accessibility implications:** `HTMLButtonBehavior` provides `role="button"` while `HTMLAnchorBehavior` provides `role="link"`. Under the last-in-wins rule, the element would have `role="link"` (or `role="button"` if the order is reversed). ...

Where do you expect this conflict resolution to live? Should there be something more like `ElementInternals::BehaviorBasedDefaultRole`?

With the current implementation, this information (which behavior was added last) doesn't seem readily available. (I could be wrong here.)

I would be *OK* to land as-is if we add a big TODO under ElementBehavior::DefaultRole saying this conflict resolution **MUST** be implemented before adding any new behaviors that override this method.

Line 2815, Patchset 7 (Latest): if (auto* submit_behavior =
GetElement() ? GetElement()->SubmitBehavior() : nullptr) {
const AtomicString& role = submit_behavior->DefaultAriaRole();
if (!role.empty()) {
ax::mojom::blink::Role internal_role = AriaRoleToInternalRole(role);
if (internal_role != ax::mojom::blink::Role::kUnknown) {
return internal_role;
}
}
}
Jacques Newman . unresolved

Why not have this return a ax::mojom::blink::Role instead of a string? This way you don't need to deal with strings in each behavior's override of DefaultAriaRole, or run the risk that you could ever get it wrong.

AXObject::AriaRoleName could facilitate reflecting out a string if we ever need it.
```suggestion
if (auto* submit_behavior =
GetElement() ? GetElement()->SubmitBehavior() : nullptr) {
return submit_behavior->DefaultAriaRole();
}
```
Open in Gerrit

Related details

Attention is currently required from:
  • Ana Sollano Kim
  • Dan Clark
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: I42fb2cf6a5717d67def045dc5a36a8e856f78bad
    Gerrit-Change-Number: 7762931
    Gerrit-PatchSet: 7
    Gerrit-Owner: Ana Sollano Kim <anso...@microsoft.com>
    Gerrit-Reviewer: Ana Sollano Kim <anso...@microsoft.com>
    Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
    Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
    Gerrit-Reviewer: Mason Freed <mas...@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: Leo Lee <leo...@microsoft.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
    Gerrit-Attention: Ana Sollano Kim <anso...@microsoft.com>
    Gerrit-Attention: Dan Clark <dan...@microsoft.com>
    Gerrit-Comment-Date: Mon, 27 Apr 2026 21:44:10 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ana Sollano Kim (Gerrit)

    unread,
    Apr 28, 2026, 11:53:38 AM (yesterday) Apr 28
    to Jacques Newman, Dan Clark, Mason Freed, Leo Lee, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, Kevin Babbitt, (Julie)Jeongeun Kim, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, dtseng...@chromium.org, nektar...@chromium.org, abigailbk...@google.com, blink-rev...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, lucasrada...@google.com, yuzo+...@chromium.org, blink-revie...@chromium.org, josiah...@chromium.org, francisjp...@google.com, kyungjunle...@google.com, blink-rev...@chromium.org
    Attention needed from Dan Clark and Jacques Newman

    Ana Sollano Kim added 2 comments

    File third_party/blink/renderer/modules/accessibility/ax_node_object.cc
    Line 2814, Patchset 7: // Check for `HTMLSubmitButtonBehavior`'s default role.
    Jacques Newman . resolved

    While we only have this one for now, the [explainer](https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/PlatformProvidedBehaviors/explainer.md#compatible-behaviors) lays out the ability for multiple behaviors with different roles and for conflict resolution:
    > **Role conflict and accessibility implications:** `HTMLButtonBehavior` provides `role="button"` while `HTMLAnchorBehavior` provides `role="link"`. Under the last-in-wins rule, the element would have `role="link"` (or `role="button"` if the order is reversed). ...

    Where do you expect this conflict resolution to live? Should there be something more like `ElementInternals::BehaviorBasedDefaultRole`?

    With the current implementation, this information (which behavior was added last) doesn't seem readily available. (I could be wrong here.)

    I would be *OK* to land as-is if we add a big TODO under ElementBehavior::DefaultRole saying this conflict resolution **MUST** be implemented before adding any new behaviors that override this method.

    Ana Sollano Kim

    That's a good point. Implementation/design isn't set for now but I added a TODO in `third_party/blink/renderer/core/html/forms/element_behavior.h` to make sure we do that in the future (I think it will probably need to be a helper in `HTMLElement/Element` that gets the behavior that would take priority over the other ones, instead of just using `SubmitBehavior`, but tbd).

    Line 2815, Patchset 7: if (auto* submit_behavior =

    GetElement() ? GetElement()->SubmitBehavior() : nullptr) {
    const AtomicString& role = submit_behavior->DefaultAriaRole();
    if (!role.empty()) {
    ax::mojom::blink::Role internal_role = AriaRoleToInternalRole(role);
    if (internal_role != ax::mojom::blink::Role::kUnknown) {
    return internal_role;
    }
    }
    }
    Jacques Newman . resolved

    Why not have this return a ax::mojom::blink::Role instead of a string? This way you don't need to deal with strings in each behavior's override of DefaultAriaRole, or run the risk that you could ever get it wrong.

    AXObject::AriaRoleName could facilitate reflecting out a string if we ever need it.
    ```suggestion
    if (auto* submit_behavior =
    GetElement() ? GetElement()->SubmitBehavior() : nullptr) {
    return submit_behavior->DefaultAriaRole();
    }
    ```
    Ana Sollano Kim

    Thanks for the suggestion! Done.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dan Clark
    • Jacques Newman
    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: I42fb2cf6a5717d67def045dc5a36a8e856f78bad
      Gerrit-Change-Number: 7762931
      Gerrit-PatchSet: 9
      Gerrit-Owner: Ana Sollano Kim <anso...@microsoft.com>
      Gerrit-Reviewer: Ana Sollano Kim <anso...@microsoft.com>
      Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
      Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
      Gerrit-Reviewer: Mason Freed <mas...@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: Leo Lee <leo...@microsoft.com>
      Gerrit-CC: Nate Chapin <jap...@chromium.org>
      Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
      Gerrit-Attention: Dan Clark <dan...@microsoft.com>
      Gerrit-Attention: Jacques Newman <jane...@microsoft.com>
      Gerrit-Comment-Date: Tue, 28 Apr 2026 15:53:31 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Jacques Newman <jane...@microsoft.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Jacques Newman (Gerrit)

      unread,
      Apr 28, 2026, 5:47:05 PM (22 hours ago) Apr 28
      to Ana Sollano Kim, Dan Clark, Mason Freed, Leo Lee, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, Kevin Babbitt, (Julie)Jeongeun Kim, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, dtseng...@chromium.org, nektar...@chromium.org, abigailbk...@google.com, blink-rev...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, lucasrada...@google.com, yuzo+...@chromium.org, blink-revie...@chromium.org, josiah...@chromium.org, francisjp...@google.com, kyungjunle...@google.com, blink-rev...@chromium.org
      Attention needed from Ana Sollano Kim and Dan Clark

      Jacques Newman voted and added 1 comment

      Votes added by Jacques Newman

      Code-Review+1

      1 comment

      Patchset-level comments
      File-level comment, Patchset 9 (Latest):
      Jacques Newman . unresolved

      Thanks for making the change to use the role type, looks much nicer to me.

      third_party/blink/renderer/modules/accessibility/ax_node_object.cc lgtm, but I'm a little confused that the code coverage is claiming the new logic isn't getting hit in test. Worth double checking and making sure these tests are really being run..

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ana Sollano Kim
      • Dan Clark
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement 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: I42fb2cf6a5717d67def045dc5a36a8e856f78bad
        Gerrit-Change-Number: 7762931
        Gerrit-PatchSet: 9
        Gerrit-Owner: Ana Sollano Kim <anso...@microsoft.com>
        Gerrit-Reviewer: Ana Sollano Kim <anso...@microsoft.com>
        Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
        Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
        Gerrit-Reviewer: Mason Freed <mas...@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: Leo Lee <leo...@microsoft.com>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
        Gerrit-Attention: Ana Sollano Kim <anso...@microsoft.com>
        Gerrit-Attention: Dan Clark <dan...@microsoft.com>
        Gerrit-Comment-Date: Tue, 28 Apr 2026 21:46:58 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Ana Sollano Kim (Gerrit)

        unread,
        1:33 PM (3 hours ago) 1:33 PM
        to Jacques Newman, Dan Clark, Mason Freed, Leo Lee, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, Kevin Babbitt, (Julie)Jeongeun Kim, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, dtseng...@chromium.org, nektar...@chromium.org, abigailbk...@google.com, blink-rev...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, lucasrada...@google.com, yuzo+...@chromium.org, blink-revie...@chromium.org, josiah...@chromium.org, francisjp...@google.com, kyungjunle...@google.com, blink-rev...@chromium.org
        Attention needed from Dan Clark

        Ana Sollano Kim added 1 comment

        Patchset-level comments
        Jacques Newman . resolved

        Thanks for making the change to use the role type, looks much nicer to me.

        third_party/blink/renderer/modules/accessibility/ax_node_object.cc lgtm, but I'm a little confused that the code coverage is claiming the new logic isn't getting hit in test. Worth double checking and making sure these tests are really being run..

        Ana Sollano Kim

        Not sure why the code coverage isn't picking it up. CEs don't have an assigned role and aren't focusable by default, but the tests are passing. That tells me they're working well.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Dan Clark
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement 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: I42fb2cf6a5717d67def045dc5a36a8e856f78bad
          Gerrit-Change-Number: 7762931
          Gerrit-PatchSet: 9
          Gerrit-Owner: Ana Sollano Kim <anso...@microsoft.com>
          Gerrit-Reviewer: Ana Sollano Kim <anso...@microsoft.com>
          Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
          Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
          Gerrit-Reviewer: Mason Freed <mas...@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: Leo Lee <leo...@microsoft.com>
          Gerrit-CC: Nate Chapin <jap...@chromium.org>
          Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
          Gerrit-Attention: Dan Clark <dan...@microsoft.com>
          Gerrit-Comment-Date: Wed, 29 Apr 2026 17:32:51 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages