From 088b919966bf86e347ff6d86eca440d8f2c1b0fd Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Tue, 16 Jul 2024 16:12:42 -0700 Subject: [PATCH] Update content model for customizable select This PR updated the content model for the . Fixes https://github.com/whatwg/html/issues/10317 --- source | 47 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/source b/source index de407dd6dc0..7b6180cf6be 100644 --- a/source +++ b/source @@ -12785,6 +12785,34 @@ https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E% +
Select element inner content elements
+ +

Select element inner content elements are option elements and other + elements which are used to group and decorate them with a select element.

+ +

The following are select element inner content elements:

+ + + +
Transparent content models
@@ -53203,7 +53231,8 @@ 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 more select element inner content elements.
+
Zero or one child button.
Content attributes:
Global attributes
autocomplete
@@ -53932,9 +53961,9 @@ interface HTMLDataListElement : HTMLElement {
Categories:
None.
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 more select element inner content elements.
Content attributes:
Global attributes
disabled
@@ -54029,17 +54058,15 @@ interface HTMLOptGroupElement : HTMLElement {
Categories:
None.
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.
+
If the element has no label attribute: Text content and zero or more div, span, noscript, img, SVG svg, and script-supporting elements.
+
If an img is used within an option and there is no other text within the option, then the option won't have an accessible name unless the img also has a non-empty alt attribute.
+
Content attributes:
Global attributes
disabled