diff --git a/source b/source index 9f6bfcc10b4..70f7e1d9529 100644 --- a/source +++ b/source @@ -57526,15 +57526,15 @@ interface HTMLOptionElement : HTMLElement {
To get the option element nearest ancestor select given an
- option option, run these steps. They return a select or
- null.
To get the nearest ancestor
+ select given an Element element, run these steps. They
+ return a select or null.
Let ancestorOptgroup be null.
For each ancestor of option's ancestors, +
For each ancestor of element's ancestors, in reverse tree order:
The '::checkmark' pseudo-element only applies to option elements
which are being rendered with base appearance.
An optgroup element is expected to be rendered by displaying the
- element's label attribute.
An optgroup element is rendered with base
+ appearance if it has an ancestor
+ select whose contents are being rendered with base appearance.
If an optgroup element is not being rendered with base appearance, then it is
+ expected to be rendered by displaying the element's label.
The optgroup element's native appearance and
+ primitive appearance needs to be better defined. See issue #12199.
If an optgroup element is being rendered
+ with base appearance, then it is expected to render with a shadow
+ tree that contains the following elements:
An optgroup legend slot, which is a slot element. It is appended
+ to the optgroup's shadow root as the first child. It is
+ expected to take the first child element of the optgroup if the first
+ child element is a legend element.
An optgroup label element, which is a div element. It is appended
+ to the optgroup legend slot. It is expected to contain a copy of the
+ text in the optgroup's label
+ attribute.
An optgroup contents slot, which is a slot element. It is appended
+ to the optgroup's shadow root after the optgroup label
+ element. It is expected to take all remaining child nodes of the
+ optgroup element.
To determine if a select's options are being rendered with base
- appearance, given a select element select:
To determine if a select's contents are being rendered with base appearance, given a
+ select element select:
If select is being rendered as a list box with base
@@ -148778,13 +148811,33 @@ progress { appearance: auto; }
ancestor select and the select's options are
being rendered with base appearance.
An option element is expected to be rendered by displaying the result
- of collect option text given the option and true, indented under its
- optgroup element if it has one. If the option is being rendered with base appearance and the
- option's label attribute is not set, then the
- option is expected to render all of its children rather than by
- displaying its label.
If an option element is not being rendered
+ with base appearance, then it is expected to be rendered by displaying the
+ result of collect option text given the option and true.
If an option element is being rendered
+ with base appearance, then it is expected to render with a shadow
+ tree that contains the following elements:
An option contents slot, which is a slot element. It is appended to
+ the option's shadow root as the second child. If the
+ option has the label attribute set to any
+ value besides the empty string, then the option contents slot is
+ expected to not take any nodes. Otherwise, it is expected to to take
+ all child nodes of the option element.
When the option contents slot does not take any elements, the
+ option label element is rendered as fallback content, which happens when the author
+ sets the label attribute.
An option label element, which is a span element. It is appended
+ to the option contents slot. It is expected to have a text node child
+ containing the value of the option's label
+ attribute.
Each sequence of one or more child hr element siblings may be rendered as a single
separator.
The following styles are expected to apply to the optgroup label
+ element when its parent optgroup element is being rendered with base appearance:
padding-inline: 0.5em
min-block-size: 1lh
textarea element