Revert "Use slot fallback to render optgroup label attr"#60746
Merged
Conversation
This reverts commit db609514c367c1018fccbea7e3e78c8036fc1ae4. Reason for revert: Consistent test failures on Fuchsia bots due to accessibility tree expectation mismatches. Affected tests include: - DumpAccessibilityTreeTest.AccessibilityComboboxOptgroup - DumpAccessibilityTreeTest.AccessibilityModalDialogClosed - DumpAccessibilityTreeTest.AccessibilityModalDialogOpened - DumpAccessibilityTreeTest.AccessibilityModalDialogStack - DumpAccessibilityTreeTest.AccessibilityOptgroup ... and others. Failure Link: https://ci.chromium.org/ui/p/chromium/builders/ci/fuchsia-x64-cast-receiver-rel/30173/overview https://ci.chromium.org/ui/p/chromium/builders/ci/fuchsia-arm64-cast-receiver-rel/30278/test-results Original change's description: > Use slot fallback to render optgroup label attr > > Instead of setting display:none on the element which holds the label > attribute when a legend element is present, we can put the label > attribute holding element as a child of a new slot for the legend > element, so it automatically gets rendered when there is no legend > element. > > The legend element is only supposed to be the first element in the > optgroup as per the content model in the HTML spec, so this patch also > enforces that by only slotting the legend element in when it is the > first child element. Allowing or using the legend element inside of > optgroups was a new feature with customizable select, so compat risk is > low. > > Context: whatwg/html#12201 (comment) > > There are a11y test expectations because the UA shadowroot is being > changed, but this should not be visible to ATs because the new nodes are > marked as invisible and ignored, and only appear in the internal "blink" > a11y trees as opposed to real platform trees. > > Change-Id: I776fee963146abbad2028638479df7d3362c35ac > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7629416 > Reviewed-by: Joey Arhar <jarhar@chromium.org> > Reviewed-by: David Baron <dbaron@chromium.org> > Commit-Queue: Joey Arhar <jarhar@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1649235} No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Iae750043c09be7dede4b8fbea417995de96ec9cb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7961701 Owners-Override: Anna Sato <annasato@chromium.org> Commit-Queue: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Anna Sato <annasato@chromium.org> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#1649473}
wpt-pr-bot
approved these changes
Jun 19, 2026
wpt-pr-bot
left a comment
Collaborator
There was a problem hiding this comment.
The review process for this patch is being conducted in the Chromium project.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This reverts commit db609514c367c1018fccbea7e3e78c8036fc1ae4.
Reason for revert: Consistent test failures on Fuchsia bots due to accessibility tree expectation mismatches.
Affected tests include: - DumpAccessibilityTreeTest.AccessibilityComboboxOptgroup - DumpAccessibilityTreeTest.AccessibilityModalDialogClosed - DumpAccessibilityTreeTest.AccessibilityModalDialogOpened - DumpAccessibilityTreeTest.AccessibilityModalDialogStack - DumpAccessibilityTreeTest.AccessibilityOptgroup ... and others.
Failure Link:
https://ci.chromium.org/ui/p/chromium/builders/ci/fuchsia-x64-cast-receiver-rel/30173/overview
https://ci.chromium.org/ui/p/chromium/builders/ci/fuchsia-arm64-cast-receiver-rel/30278/test-results
Original change's description:
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Iae750043c09be7dede4b8fbea417995de96ec9cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7961701
Owners-Override: Anna Sato <annasato@chromium.org>
Commit-Queue: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Anna Sato <annasato@chromium.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1649473}