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.

  1. Let ancestorOptgroup be null.

  2. -

    For each ancestor of option's ancestors, +

    For each ancestor of element's ancestors, in reverse tree order:

      @@ -148753,12 +148753,45 @@ progress { appearance: auto; }

      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:

      + +
        +
      1. 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.

      2. + +
      3. 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.

      4. + +
      5. 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.

      6. +
      -

      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:

      1. 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:

        + +
          +
        1. +

          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.

          +
        2. + +
        3. 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.

        4. +

        Each sequence of one or more child hr element siblings may be rendered as a single separator.

        @@ -148966,6 +149019,16 @@ select { block-size: calc(max(24px, 1lh) * attr(size type(<integer>), 4)); } +

        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

        • +
        +

        The textarea element