Conversation
The first child `<button>` element of a `<select>` element was only tied into the rendering of base appearance, through the select button slot. But as it takes over the function of the `<select>` element's button text, it should apply regardless of appearance value. Give it a semantics section statement, and define the shown text of a drop-down box in terms of it. As that text can depend on the selected `<option>` element through the `<selectedcontent>` element, the width of the `<select>`'s labels now needs to account for any `<option>` element being selected. Collecting the `<button>` element's text generalizes collect option text to any element, as its steps were never `<option>`-specific. Also correct the note following the customizable `<select>` example: form submission is prevented by the `<button>` element not being a submit button, not by it being inert. Tests: web-platform-tests/wpt#62674 Fixes #12474.
annevk
force-pushed
the
select-native-appearance-button
branch
from
September 14, 2026 14:14
23092cb to
6f5cd62
Compare
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.
The first child
<button>element of a<select>element was only tiedinto the rendering of base appearance, through the select button slot.
But as it takes over the function of the
<select>element's buttontext, it should apply regardless of appearance value.
Give it a semantics section statement, and define the shown text of a
drop-down box in terms of it. As that text can depend on the selected
<option>element through the<selectedcontent>element, the width ofthe
<select>'s labels now needs to account for any<option>elementbeing selected. Collecting the
<button>element's text generalizescollect option text to any element, as its steps were never
<option>-specific.Also correct the note following the customizable
<select>example:form submission is prevented by the
<button>element not being asubmit button, not by it being inert.
Tests: web-platform-tests/wpt#62674
Fixes #12474.
(See WHATWG Working Mode: Changes for more details.)
/form-elements.html ( diff )
/rendering.html ( diff )