diff --git a/source b/source index b8a0cef9a14..8a22133e550 100644 --- a/source +++ b/source @@ -12927,6 +12927,55 @@ https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E% +
Select element inner content elements
+ +

Select element inner content elements are the elements which are allowed as + descendants of select elements.

+ +

The following are select element inner content elements:

+ + + +
Optgroup element inner content elements
+ +

Optgroup element inner content elements are the elements which are allowed as + descendants of optgroup elements.

+ +

The following are optgroup element inner content elements:

+ + + +
Option element inner content elements
+ + + +

Option element inner content elements are div and phrasing + content, but there must be no descendants which are datalist, + object, or interactive content, and no descendants may have the tabindex attribute specified.

+ +
Transparent content models
@@ -19930,6 +19979,7 @@ and is further discussed below.</div>
Categories:
Flow content.
+
Select element inner content elements.
Contexts in which this element can be used:
Where flow content is expected.
As a child of a select element.
@@ -21664,12 +21714,18 @@ included with Exhibit B.
Categories:
Flow content.
Palpable content.
+
Select element inner content elements.
+
Optgroup element inner content elements.
+
Option element inner content elements.
Contexts in which this element can be used:
Where flow content is expected.
As a child of a dl element.
Content model:
If the element is a child of a dl element: one or more dt elements followed by one or more dd elements, optionally intermixed with script-supporting elements.
-
If the element is not a child of a dl element: flow content.
+
Otherwise, if the element is a descendant of an option element: Zero or more option element inner content elements.
+
Otherwise, if the element is a descendant of an optgroup element: Zero or more optgroup element inner content elements.
+
Otherwise, if the element is a descendant of a select element: Zero or more select element inner content elements.
+
Otherwise: flow content.
Content attributes:
Global attributes
</p>
Contexts in which this element can be used:
Where phrasing content is expected.
Content model:
-
Phrasing content.
+
If the element is a descendant of an option element: Zero or more option element inner content elements.
+
Otherwise: Phrasing content.
Content attributes:
Global attributes
Palpable content.
Contexts in which this element can be used:
Where phrasing content is expected.
+
As the first child of a select element.
Content model:
Phrasing content, but there must be no interactive content descendant and no descendant with the tabindex attribute @@ -53601,7 +53659,7 @@ interface HTMLButtonElement : HTMLElement {
Contexts in which this element can be used:
Where phrasing content is expected.
Content model:
-
Zero or more option, optgroup, hr, and script-supporting elements.
+
Zero or one button element if the select is a drop-down box followed by zero or more select element inner content elements.
Content attributes:
Global attributes
autocomplete
@@ -54328,11 +54386,11 @@ interface HTMLDataListElement : HTMLElement {
Categories:
-
None.
+
Select element inner content elements.
Contexts in which this element can be used:
-
As a child of a select element.
+
As a descendant of a select element.
Content model:
-
Zero or more option and script-supporting elements.
+
Zero or one legend element followed by zero or more optgroup element inner content elements.
Content attributes:
Global attributes
disabled
@@ -54425,19 +54483,20 @@ interface HTMLOptGroupElement : HTMLElement {
Categories:
-
None.
+
Select element inner content elements.
+
Optgroup element inner content elements.
Contexts in which this element can be used:
-
As a child of a select element.
+
As a descendant of a select element.
As a child of a datalist element.
-
As a child of an optgroup element.
+
As a descendant of an optgroup element.
Content model:
If the element has a label attribute and a value attribute: Nothing.
If the element has a label attribute but no value attribute: Text.
If the element has no label attribute and is not a - child of a datalist element: Text that is not - inter-element whitespace.
-
If the element has no label attribute and is a child - of a datalist element: Text.
+ descendant of a datalist element: Zero or more option element inner content + elements. +
If the element has no label attribute and is a + descendant of a datalist element: Text.
Content attributes:
Global attributes
disabled
@@ -54505,8 +54564,8 @@ interface HTMLOptionElement : HTMLElement {

The value attribute provides a value for element. The value of an option element is the value of the value - content attribute, if there is one, or, if there is not, the value of the element's text IDL attribute.

+ content attribute, if there is one, or, if there is not, the result of collect option + text given this and false.

The selected attribute is a boolean attribute. It represents the default HTMLOptionElement : HTMLElement { IDL attribute must return the element's index.

The text IDL - attribute, on getting, must return the result of stripping and collapsing ASCII whitespace from the concatenation of data of all the Text node descendants of the - option element, in tree order, excluding any that are descendants of - descendants of the option element that are themselves script or - SVG script elements.

+ attribute, on getting, must return the result of collect option text given + this and true.

The text attribute's setter must string replace all with the given value within this element.

@@ -54683,6 +54738,36 @@ interface HTMLOptionElement : HTMLElement {
  • Return option.

  • +

    To collect option text, given an option element option and a + boolean includeAltText:

    + +
      +
    1. Let text be the empty string.

    2. + +
    3. +

      For each descendant of option in tree order:

      + +
        +
      1. If descendant is a script or SVG + script element, then continue skipping all + >descendants of descendant.

      2. + +
      3. If descendant is a Text node, then set text to + the concatenation of text and descendant's data.

      4. + +
      5. If descendant is an img element and the value of + descendant's alt attribute is not empty, then + set text to the concatenation of text, " ", the value of + descendant's alt attribute, and " ".

      6. +
      +
    4. + +
    5. Return the result of strip and collapse ASCII whitespace given + text.

    6. +
    + @@ -56171,8 +56256,13 @@ interface HTMLFieldSetElement : HTMLElement {
    None.
    Contexts in which this element can be used:
    As the first child of a fieldset element.
    +
    As the first child of an optgroup element.
    Content model:
    -
    Phrasing content, optionally intermixed with heading content.
    +
    If the element is the first child of a fieldset element: + Phrasing content, optionally intermixed with heading content.
    +
    If the element is the first child of an optgroup element: + Phrasing content, but there must be no interactive content and no + descendant with the tabindex attribute.
    Content attributes:
    Global attributes
    HTMLLegendElement : HTMLElement {

    The legend element represents a caption for the rest of the contents of the legend element's parent fieldset element, if - any.

    + any
    . Otherwise, if the legend has a parent optgroup element, then + the legend represents the optgroup's label.

    legend.form
    @@ -63840,6 +63931,8 @@ not-slash = %x0000-002E / %x0030-10FFFF
    Metadata content.
    Flow content.
    Phrasing content.
    +
    Select element inner content elements.
    +
    Optgroup element inner content elements.
    Contexts in which this element can be used:
    In a head element of an HTML document, if there are no ancestor noscript elements.
    Where phrasing content is expected in HTML documents, if there are no ancestor noscript elements.
    @@ -140406,10 +140499,19 @@ interface External { div Generic flow container, or container for name-value groups in dl elements flow; - palpable + palpable; + select element inner content elements; + optgroup element inner content elements; + option element inner content elements flow; - dl - flow + dl; + select element inner content elements; + optgroup element inner content elements; + option element inner content elements + flow + select element inner content elements*; + optgroup element inner content elements*; + option element inner content elements* globals HTMLDivElement @@ -140598,8 +140700,10 @@ interface External { hr Thematic break - flow - flow + flow; + select element inner content elements + flow; + select element inner content elements empty globals HTMLHRElement @@ -140778,8 +140882,9 @@ interface External { legend Caption for fieldset none - fieldset - phrasing; + fieldset; + optgroup + phrasing*; heading content globals HTMLLegendElement @@ -140945,7 +141050,9 @@ interface External { Fallback content for script metadata; flow; - phrasing + phrasing; + select element inner content elements; + optgroup element inner content elements head*; phrasing* varies* @@ -140993,10 +141100,11 @@ interface External { optgroup Group of options in a list box - none - select - option; - script-supporting elements + select element inner content elements + select; + div* + optgroup element inner content elements; + legend* globals; disabled; label @@ -141006,11 +141114,14 @@ interface External { option Option in a list box or combo box control - none + select element inner content elements; + optgroup element inner content elements select; datalist; - optgroup - text* + optgroup; + div* + text*; + option element inner content elements* globals; disabled; label; @@ -141222,9 +141333,8 @@ interface External { form-associated; palpable phrasing - option; - optgroup; - script-supporting elements + select element inner content elements; + button* globals; autocomplete; disabled; @@ -141285,7 +141395,8 @@ interface External { flow; phrasing; palpable - phrasing + phrasing; + option element inner content elements* phrasing globals HTMLSpanElement @@ -142057,6 +142168,37 @@ interface External { — + + Select element inner content elements + + option; + optgroup; + hr; + script-supporting elements; + noscript; + div + + — + + + Optgroup element inner content elements + + option; + script-supporting elements; + noscript; + div + + — + + + Option element inner content elements + + div + + phrasing content except for datalist, object, + interactive content, or elements with tabindex +