Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 27 additions & 19 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -55977,11 +55977,10 @@ interface <dfn interface>HTMLSelectElement</dfn> : <span>HTMLElement</span> {

<div algorithm>
<p>If a <code>select</code> element has a <code data-x="attr-select-required">required</code>
attribute specified, does not have a <code data-x="attr-select-multiple">multiple</code> attribute
specified, and has a <span data-x="concept-select-size">display size</span> of 1; and if the <span
data-x="concept-option-value">value</span> of the first <code>option</code> element in the
<code>select</code> element's <span data-x="concept-select-option-list">list of options</span> (if
any) is the empty string, and that <code>option</code> element's parent node is the
attribute specified, and has a <span data-x="concept-select-size">display size</span> of 1; and if
the <span data-x="concept-option-value">value</span> of the first <code>option</code> element in
the <code>select</code> element's <span data-x="concept-select-option-list">list of options</span>
(if any) is the empty string, and that <code>option</code> element's parent node is the
<code>select</code> element (and not an <code>optgroup</code> element), then that
<code>option</code> is the <code>select</code> element's <dfn>placeholder label option</dfn>.</p>
</div>
Expand Down Expand Up @@ -147666,11 +147665,14 @@ progress { appearance: auto; }</code></pre>

<p>A <code>select</code> element whose <code data-x="attr-select-multiple">multiple</code>
attribute is present is <span>expected</span> to render as a multi-select <span>list
box</span>.</p>
box</span> if its <span data-x="concept-select-size">display size</span> is greater than 1. If the
<code>select</code> element has a display size of 1, then it may render as a <span>drop-down
box</span> if the platform supports it, otherwise as a <span>list box</span>.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
box</span> if the platform supports it, otherwise as a <span>list box</span>.</p>
box</span> if the platform supports it; otherwise as a <span>list box</span>.</p>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is also dropping some nuance. Shouldn't we prefix all the "box" types with "multi-select"? Because a platform might well support a drop-down box, but the question is really if it supports a multi-select drop-down box.


<p>A <code>select</code> element whose <code data-x="attr-select-multiple">multiple</code>
attribute is absent, and whose <span data-x="concept-select-size">display size</span> is greater
than 1, is <span>expected</span> to render as a single-select <span>list box</span>.</p>
attribute is absent, is <span>expected</span> to render as a <span>drop-down box</span> if its
<span data-x="concept-select-size">display size</span> is 1, or as a <span>list box</span> if its
<span data-x="concept-select-size">display size</span> is greater than 1.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly here I think dropping "single-select" is a mistake.


<div algorithm>
<p>When the element renders as a <span>list box</span>, it is a <span>devolvable widget</span>
Expand Down Expand Up @@ -147698,16 +147700,14 @@ progress { appearance: auto; }</code></pre>
</ol>
</div>

<p>A <code>select</code> element whose <code data-x="attr-select-multiple">multiple</code>
attribute is absent, and whose <span data-x="concept-select-size">display size</span> is 1, is
<span>expected</span> to render as an <span>'inline-block'</span> one-line <span>drop-down
box</span>. The <span>inline size</span> of its <span>intrinsic size</span> is the
<span>width of the <code>select</code>'s labels</span>. If the <span>'field-sizing'</span>
property on the element has a <span>computed value</span> of
<span data-x="field-sizing-content">'content'</span>, the <span>inline size</span> of the
<span>intrinsic size</span> depends on the shown text. The shown text is typically the label of
an <code>option</code> of which <span data-x="concept-option-selectedness">selectedness</span> is
set to true.</p>
<p>A <code>select</code> element which is being rendered as a <span>drop-down box</span> is
<span>expected</span> to render as an <span>'inline-block'</span> box. The <span>inline
size</span> of its <span>intrinsic size</span> is the <span>width of the <code>select</code>'s
labels</span>. If the <span>'field-sizing'</span> property on the element has a <span>computed
value</span> of <span data-x="field-sizing-content">'content'</span>, the <span>inline size</span>
of the <span>intrinsic size</span> depends on the shown text. The shown text is typically the
label of an <code>option</code> of which <span
data-x="concept-option-selectedness">selectedness</span> is set to true.</p>

<div algorithm>
<p>When the element renders as a <span>drop-down box</span>, it is a <span>devolvable
Expand Down Expand Up @@ -147806,7 +147806,15 @@ progress { appearance: auto; }</code></pre>
<p>The <dfn>width of the <code>select</code>'s labels</dfn> is the wider of the width necessary to
render the widest <code>optgroup</code>, and the width necessary to render the widest
<code>option</code> element in the element's <span data-x="concept-select-option-list">list of
options</span> (including its indent, if any).</p>
options</span> (including its indent, if any). If the <code>select</code> has the <code
data-x="attr-select-multiple">multiple</code> attribute and is being rendered as a
<span>drop-down box</span>, then the width should also be wide enough to accomodate the text
rendered in the <code>select</code> with any combination of <code>option</code>s selected.</p>

<p class="note">The <span>width of the <code>select</code>'s labels</span> has an accomodation for
<code data-x="attr-select-multiple">multiple</code> because some implementations use special text
to represent multiple options being selected, such as "2 selected." In this case, the select needs
to be wide enough to render "2 selected" in addition to the individual <code>option</code>s.</p>
</div>

<p>If a <code>select</code> element contains a <span>placeholder label option</span>, the user
Expand Down