diff --git a/source b/source index 9e11deef691..19ff73ede08 100644 --- a/source +++ b/source @@ -19333,6 +19333,7 @@ and is further discussed below.</div>
Flow content.
Contexts in which this element can be used:
Where flow content is expected.
+
As a child of a select element, when preceded and followed by an option element.
Content model:
Nothing.
Content attributes:
@@ -19354,8 +19355,8 @@ interface HTMLHRElement : HTMLElement {

The hr element represents a paragraph-level thematic - break, e.g. a scene change in a story, or a transition to another topic within a section of a - reference book.

+ break, e.g., a scene change in a story, a transition to another topic within a section of a + reference book, or a separator between a set of options of a select element.

@@ -52219,7 +52220,8 @@ interface HTMLButtonElement : HTMLElement {
Contexts in which this element can be used:
Where phrasing content is expected.
Content model:
-
Zero or more option, optgroup, and script-supporting elements.
+
Either: Zero or more option, optgroup, and script-supporting elements.
+
Or: Zero or more option elements, optionally separated from each other by a hr element, and optionally intermixed with script-supporting elements.
Content attributes:
Global attributes
autocomplete
@@ -52773,6 +52775,19 @@ interface HTMLSelectElement : HTMLElement {
+
+

Occasionally it can be useful to have a separator: + +

<label>
+ Select the song to play next:
+ <select required name="next">
+  <option value="sr">Random
+  <hr>
+  <option value="s1">It Sucks to Be Me (Reprise)
+  <option value="s2">There is Life Outside Your Apartment
+  …
+
+

The datalist element

@@ -112706,9 +112721,9 @@ dictionary StorageEventInit : EventInit {

An option element's end tag may be omitted if - the option element is immediately followed by another option element, or - if it is immediately followed by an optgroup element, or if there is no more content - in the parent element.

+ the option element is immediately followed by another option element, if + it is immediately followed by an optgroup element, if it is immediately followed by + an hr element, or if there is no more content in the parent element.

A colgroup element's start tag may be @@ -120898,6 +120913,27 @@ document.body.appendChild(text);

Insert an HTML element for the token.

+
A start tag whose tag name is "hr"
+
+ +

If the current node is an option element, pop that node from the + stack of open elements.

+ + +

If the current node is an optgroup element, parse + error; ignore the token.

+ +

Otherwise, run these steps:

+ +
    +
  1. Insert an HTML element for the token. Immediately pop the current + node off the stack of open elements.

  2. + +
  3. Acknowledge the token's self-closing flag, if it is set.

  4. +
+
+
An end tag whose tag name is "optgroup"
@@ -125793,6 +125829,9 @@ progress { appearance: auto; } data-x="concept-option-label">label, indented under its optgroup element if it has one.

+

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

+

The width of the select's labels is the wider of the width necessary to render the widest optgroup, and the width necessary to render the widest option element in the element's list of @@ -133994,16 +134033,16 @@ INSERT INTERFACES HERE Dean Edridge, Dean Edwards, Dean Jackson, - Debanjana Sarkar , + Debanjana Sarkar, Debi Orton, - Delan Azabani, + Delan Azabani, Derek Featherstone, Derek Guenther, Devarshi Pant, Devdatta, Devin Rousso, Diego Ferreiro Val, - Diego González Zúñiga , + Diego González Zúñiga, Diego Ponce de León, Dimitri Glazkov, Dimitry Golubovsky, @@ -134047,6 +134086,7 @@ INSERT INTERFACES HERE Eric Portis, Eric Rescorla, Eric Semling, + Eric Shepherd, Eric Willigers, Erik Arvidsson, Erik Charlebois,