Skip to content

Commit

Permalink
[e] (0) Minor clean-up of concept-fe-value vs <select>.
Browse files Browse the repository at this point in the history
Affected topics: DOM APIs, HTML

git-svn-id: http://svn.whatwg.org/webapps@8382 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 7, 2014
1 parent 21d0bbd commit 5d4574d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 14 deletions.
18 changes: 14 additions & 4 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -44333,7 +44333,8 @@ <h4 id=the-select-element><span class=secno>4.10.7 </span>The <dfn><code>select<

<dd>

<p>Returns the <a href=#concept-fe-value title=concept-fe-value>value</a> of the first selected item, if any,
<!--CLEANUP-->
<p>Returns the <a href=#concept-option-value title=concept-option-value>value</a> of the first selected item, if any,
or the empty string if there is no selected item.</p>

<p>Can be set, to change the selection.</p>
Expand Down Expand Up @@ -46476,13 +46477,17 @@ <h4 id=form-control-infrastructure><span class=secno>4.10.18 </span>Form control

<h5 id="a-form-control's-value"><span class=secno>4.10.18.1 </span>A form control's value</h5>

<p>Form controls have a <dfn id=concept-fe-value title=concept-fe-value>value</dfn> and a <dfn id=concept-fe-checked title=concept-fe-checked>checkedness</dfn>. (The latter is only used by <code><a href=#the-input-element>input</a></code>
<p>Most form controls have a <dfn id=concept-fe-value title=concept-fe-value>value</dfn> and a <dfn id=concept-fe-checked title=concept-fe-checked>checkedness</dfn>. (The latter is only used by <code><a href=#the-input-element>input</a></code>
elements.) These are used to describe how the user interacts with the control.</p>

<p>To define the behaviour of constraint validation in the face of the <code><a href=#the-input-element>input</a></code>
element's <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute, <code><a href=#the-input-element>input</a></code> elements
can also have separately defined <dfn id=concept-fe-values title=concept-fe-values>value<em>s</em></dfn>.</p>

<p>The <code><a href=#the-select-element>select</a></code> element does not have a <a href=#concept-fe-value title=concept-fe-value>value</a>;
the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of its <code><a href=#the-option-element>option</a></code>
elements is what is used instead.</p>


<h5 id=mutability><span class=secno>4.10.18.2 </span>Mutability</h5>

Expand All @@ -46491,6 +46496,7 @@ <h5 id=mutability><span class=secno>4.10.18.2 </span>Mutability</h5>
<p class=note>This determines (by means of definitions and requirements in this specification
that rely on whether an element is so designated) whether or not the user can modify the <a href=#concept-fe-value title=concept-fe-value>value</a> or <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> of a
form control, or whether or not a control can be automatically prefilled.</p>
<!-- or the concept-option-selectedness, or the concept-fe-values... -->


<h5 id=association-of-controls-and-forms><span class=secno>4.10.18.3 </span>Association of controls and forms</h5>
Expand Down Expand Up @@ -47886,6 +47892,7 @@ <h5 id=autofilling-form-controls:-the-autocomplete-attribute><span class=secno>4

</ol><p>When an element's <a href=#autofill-field-name>autofill field name</a> is "<code title=attr-fe-autocomplete-off><a href=#attr-fe-autocomplete-off>off</a></code>", the user agent should not remember the control's
<a href=#concept-fe-value title=concept-fe-value>value</a>, and should not offer past values to the user.</p>
<!-- XXX for select concept-option-selectedness -->

<p class=note>In addition, when an element's <a href=#autofill-field-name>autofill field name</a> is "<code title=attr-fe-autocomplete-off><a href=#attr-fe-autocomplete-off>off</a></code>", <a href=#history-autocomplete>values are reset</a>
when <a href=#traverse-the-history title="traverse the history">traversing the history</a>.</p>
Expand All @@ -47900,6 +47907,7 @@ <h5 id=autofilling-form-controls:-the-autocomplete-attribute><span class=secno>4
</div>

<p>When an element's <a href=#autofill-field-name>autofill field name</a> is <em>not</em> "<code title=attr-fe-autocomplete-off><a href=#attr-fe-autocomplete-off>off</a></code>", the user agent may store the control's <a href=#concept-fe-value title=concept-fe-value>value</a>, and may offer previously stored values to the user.</p>
<!-- XXX for select concept-option-selectedness -->

<p>When the <a href=#autofill-field-name>autofill field name</a> is "<code title=attr-fe-autocomplete-on><a href=#attr-fe-autocomplete-on>on</a></code>",
the user agent should attempt to use heuristics to determine the most appropriate values to offer
Expand Down Expand Up @@ -47943,6 +47951,7 @@ <h5 id=autofilling-form-controls:-the-autocomplete-attribute><span class=secno>4
been inserted into the document, or when the user agent <a href=#stop-parsing title="stop parsing">stops
parsing</a>). User agents must only prefill controls using values that the user could have
entered.</p>
<!-- XXX for select concept-option-selectedness -->

<p class=example>For example, if a <code><a href=#the-select-element>select</a></code> element only has <code><a href=#the-option-element>option</a></code>
elements with values "Steve" and "Rebecca", "Jay", and "Bob", and has an <a href=#autofill-field-name>autofill field
Expand Down Expand Up @@ -48425,8 +48434,9 @@ <h5 id=definitions><span class=secno>4.10.21.1 </span>Definitions</h5>

<dl><dt> <dfn id=suffering-from-being-missing>Suffering from being missing</dfn> </dt>

<dd> <p>When a control has no <a href=#concept-fe-value title=concept-fe-value>value</a> but has a <code title="">required</code> attribute (<code><a href=#the-input-element>input</a></code> <code title=attr-input-required><a href=#attr-input-required>required</a></code>, <code><a href=#the-select-element>select</a></code> <code title=attr-select-required><a href=#attr-select-required>required</a></code>, <code><a href=#the-textarea-element>textarea</a></code> <code title=attr-textarea-required><a href=#attr-textarea-required>required</a></code>), or, in the case of an element in a <i><a href=#radio-button-group>radio
button group</a></i>, any of the other elements in the group has a <code title=attr-input-required><a href=#attr-input-required>required</a></code> attribute. </dd>
<dd> <p>When a control has no <a href=#concept-fe-value title=concept-fe-value>value</a> but has a <code title="">required</code> attribute (<code><a href=#the-input-element>input</a></code> <code title=attr-input-required><a href=#attr-input-required>required</a></code>, <code><a href=#the-textarea-element>textarea</a></code> <code title=attr-textarea-required><a href=#attr-textarea-required>required</a></code>); or, in the case of an element in a <i><a href=#radio-button-group>radio
button group</a></i>, any of the other elements in the group has a <code title=attr-input-required><a href=#attr-input-required>required</a></code> attribute; or, for <code><a href=#the-select-element>select</a></code> elements,
none of the <code><a href=#the-option-element>option</a></code> elements have their <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set (<code><a href=#the-select-element>select</a></code> <code title=attr-select-required><a href=#attr-select-required>required</a></code>).</dd>

<dt> <dfn id=suffering-from-a-type-mismatch>Suffering from a type mismatch</dfn> </dt>

Expand Down
18 changes: 14 additions & 4 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -44333,7 +44333,8 @@ You cannot submit this form when the field is incorrect.</samp></pre>

<dd>

<p>Returns the <a href=#concept-fe-value title=concept-fe-value>value</a> of the first selected item, if any,
<!--CLEANUP-->
<p>Returns the <a href=#concept-option-value title=concept-option-value>value</a> of the first selected item, if any,
or the empty string if there is no selected item.</p>

<p>Can be set, to change the selection.</p>
Expand Down Expand Up @@ -46476,13 +46477,17 @@ out of 233&thinsp;257&thinsp;824 bytes available&lt;/meter&gt;&lt;/p&gt;</pre>

<h5 id="a-form-control's-value"><span class=secno>4.10.18.1 </span>A form control's value</h5>

<p>Form controls have a <dfn id=concept-fe-value title=concept-fe-value>value</dfn> and a <dfn id=concept-fe-checked title=concept-fe-checked>checkedness</dfn>. (The latter is only used by <code><a href=#the-input-element>input</a></code>
<p>Most form controls have a <dfn id=concept-fe-value title=concept-fe-value>value</dfn> and a <dfn id=concept-fe-checked title=concept-fe-checked>checkedness</dfn>. (The latter is only used by <code><a href=#the-input-element>input</a></code>
elements.) These are used to describe how the user interacts with the control.</p>

<p>To define the behaviour of constraint validation in the face of the <code><a href=#the-input-element>input</a></code>
element's <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute, <code><a href=#the-input-element>input</a></code> elements
can also have separately defined <dfn id=concept-fe-values title=concept-fe-values>value<em>s</em></dfn>.</p>

<p>The <code><a href=#the-select-element>select</a></code> element does not have a <a href=#concept-fe-value title=concept-fe-value>value</a>;
the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of its <code><a href=#the-option-element>option</a></code>
elements is what is used instead.</p>


<h5 id=mutability><span class=secno>4.10.18.2 </span>Mutability</h5>

Expand All @@ -46491,6 +46496,7 @@ out of 233&thinsp;257&thinsp;824 bytes available&lt;/meter&gt;&lt;/p&gt;</pre>
<p class=note>This determines (by means of definitions and requirements in this specification
that rely on whether an element is so designated) whether or not the user can modify the <a href=#concept-fe-value title=concept-fe-value>value</a> or <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> of a
form control, or whether or not a control can be automatically prefilled.</p>
<!-- or the concept-option-selectedness, or the concept-fe-values... -->


<h5 id=association-of-controls-and-forms><span class=secno>4.10.18.3 </span>Association of controls and forms</h5>
Expand Down Expand Up @@ -47886,6 +47892,7 @@ MIT Room 32-G524

</ol><p>When an element's <a href=#autofill-field-name>autofill field name</a> is "<code title=attr-fe-autocomplete-off><a href=#attr-fe-autocomplete-off>off</a></code>", the user agent should not remember the control's
<a href=#concept-fe-value title=concept-fe-value>value</a>, and should not offer past values to the user.</p>
<!-- XXX for select concept-option-selectedness -->

<p class=note>In addition, when an element's <a href=#autofill-field-name>autofill field name</a> is "<code title=attr-fe-autocomplete-off><a href=#attr-fe-autocomplete-off>off</a></code>", <a href=#history-autocomplete>values are reset</a>
when <a href=#traverse-the-history title="traverse the history">traversing the history</a>.</p>
Expand All @@ -47900,6 +47907,7 @@ MIT Room 32-G524
</div>

<p>When an element's <a href=#autofill-field-name>autofill field name</a> is <em>not</em> "<code title=attr-fe-autocomplete-off><a href=#attr-fe-autocomplete-off>off</a></code>", the user agent may store the control's <a href=#concept-fe-value title=concept-fe-value>value</a>, and may offer previously stored values to the user.</p>
<!-- XXX for select concept-option-selectedness -->

<p>When the <a href=#autofill-field-name>autofill field name</a> is "<code title=attr-fe-autocomplete-on><a href=#attr-fe-autocomplete-on>on</a></code>",
the user agent should attempt to use heuristics to determine the most appropriate values to offer
Expand Down Expand Up @@ -47943,6 +47951,7 @@ MIT Room 32-G524
been inserted into the document, or when the user agent <a href=#stop-parsing title="stop parsing">stops
parsing</a>). User agents must only prefill controls using values that the user could have
entered.</p>
<!-- XXX for select concept-option-selectedness -->

<p class=example>For example, if a <code><a href=#the-select-element>select</a></code> element only has <code><a href=#the-option-element>option</a></code>
elements with values "Steve" and "Rebecca", "Jay", and "Bob", and has an <a href=#autofill-field-name>autofill field
Expand Down Expand Up @@ -48425,8 +48434,9 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD

<dl><dt> <dfn id=suffering-from-being-missing>Suffering from being missing</dfn> </dt>

<dd> <p>When a control has no <a href=#concept-fe-value title=concept-fe-value>value</a> but has a <code title="">required</code> attribute (<code><a href=#the-input-element>input</a></code> <code title=attr-input-required><a href=#attr-input-required>required</a></code>, <code><a href=#the-select-element>select</a></code> <code title=attr-select-required><a href=#attr-select-required>required</a></code>, <code><a href=#the-textarea-element>textarea</a></code> <code title=attr-textarea-required><a href=#attr-textarea-required>required</a></code>), or, in the case of an element in a <i><a href=#radio-button-group>radio
button group</a></i>, any of the other elements in the group has a <code title=attr-input-required><a href=#attr-input-required>required</a></code> attribute. </dd>
<dd> <p>When a control has no <a href=#concept-fe-value title=concept-fe-value>value</a> but has a <code title="">required</code> attribute (<code><a href=#the-input-element>input</a></code> <code title=attr-input-required><a href=#attr-input-required>required</a></code>, <code><a href=#the-textarea-element>textarea</a></code> <code title=attr-textarea-required><a href=#attr-textarea-required>required</a></code>); or, in the case of an element in a <i><a href=#radio-button-group>radio
button group</a></i>, any of the other elements in the group has a <code title=attr-input-required><a href=#attr-input-required>required</a></code> attribute; or, for <code><a href=#the-select-element>select</a></code> elements,
none of the <code><a href=#the-option-element>option</a></code> elements have their <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set (<code><a href=#the-select-element>select</a></code> <code title=attr-select-required><a href=#attr-select-required>required</a></code>).</dd>

<dt> <dfn id=suffering-from-a-type-mismatch>Suffering from a type mismatch</dfn> </dt>

Expand Down
23 changes: 17 additions & 6 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -48575,7 +48575,8 @@ You cannot submit this form when the field is incorrect.</samp></pre>

<dd>

<p>Returns the <span data-x="concept-fe-value">value</span> of the first selected item, if any,
<!--CLEANUP-->
<p>Returns the <span data-x="concept-option-value">value</span> of the first selected item, if any,
or the empty string if there is no selected item.</p>

<p>Can be set, to change the selection.</p>
Expand Down Expand Up @@ -50971,14 +50972,18 @@ out of 233&#x2009;257&#x2009;824 bytes available&lt;/meter>&lt;/p></pre>

<h5>A form control's value</h5>

<p>Form controls have a <dfn data-x="concept-fe-value">value</dfn> and a <dfn
<p>Most form controls have a <dfn data-x="concept-fe-value">value</dfn> and a <dfn
data-x="concept-fe-checked">checkedness</dfn>. (The latter is only used by <code>input</code>
elements.) These are used to describe how the user interacts with the control.</p>

<p>To define the behaviour of constraint validation in the face of the <code>input</code>
element's <code data-x="attr-input-multiple">multiple</code> attribute, <code>input</code> elements
can also have separately defined <dfn data-x="concept-fe-values">value<em>s</em></dfn>.</p>

<p>The <code>select</code> element does not have a <span data-x="concept-fe-value">value</span>;
the <span data-x="concept-option-selectedness">selectedness</span> of its <code>option</code>
elements is what is used instead.</p>


<h5>Mutability</h5>

Expand All @@ -50988,6 +50993,7 @@ out of 233&#x2009;257&#x2009;824 bytes available&lt;/meter>&lt;/p></pre>
that rely on whether an element is so designated) whether or not the user can modify the <span
data-x="concept-fe-value">value</span> or <span data-x="concept-fe-checked">checkedness</span> of a
form control, or whether or not a control can be automatically prefilled.</p>
<!-- or the concept-option-selectedness, or the concept-fe-values... -->


<h5>Association of controls and forms</h5>
Expand Down Expand Up @@ -52689,6 +52695,7 @@ MIT Room 32-G524
<p>When an element's <span>autofill field name</span> is "<code
data-x="attr-fe-autocomplete-off">off</code>", the user agent should not remember the control's
<span data-x="concept-fe-value">value</span>, and should not offer past values to the user.</p>
<!-- XXX for select concept-option-selectedness -->

<p class="note">In addition, when an element's <span>autofill field name</span> is "<code
data-x="attr-fe-autocomplete-off">off</code>", <a href="#history-autocomplete">values are reset</a>
Expand All @@ -52706,6 +52713,7 @@ MIT Room 32-G524
<p>When an element's <span>autofill field name</span> is <em>not</em> "<code
data-x="attr-fe-autocomplete-off">off</code>", the user agent may store the control's <span
data-x="concept-fe-value">value</span>, and may offer previously stored values to the user.</p>
<!-- XXX for select concept-option-selectedness -->

<p>When the <span>autofill field name</span> is "<code data-x="attr-fe-autocomplete-on">on</code>",
the user agent should attempt to use heuristics to determine the most appropriate values to offer
Expand Down Expand Up @@ -52756,6 +52764,7 @@ MIT Room 32-G524
been inserted into the document, or when the user agent <span data-x="stop parsing">stops
parsing</span>). User agents must only prefill controls using values that the user could have
entered.</p>
<!-- XXX for select concept-option-selectedness -->

<p class="example">For example, if a <code>select</code> element only has <code>option</code>
elements with values "Steve" and "Rebecca", "Jay", and "Bob", and has an <span>autofill field
Expand Down Expand Up @@ -53301,11 +53310,13 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD

<dd> <p>When a control has no <span data-x="concept-fe-value">value</span> but has a <code
data-x="">required</code> attribute (<code>input</code> <code
data-x="attr-input-required">required</code>, <code>select</code> <code
data-x="attr-select-required">required</code>, <code>textarea</code> <code
data-x="attr-textarea-required">required</code>), or, in the case of an element in a <i>radio
data-x="attr-input-required">required</code>, <code>textarea</code> <code
data-x="attr-textarea-required">required</code>); or, in the case of an element in a <i>radio
button group</i>, any of the other elements in the group has a <code
data-x="attr-input-required">required</code> attribute. </p></dd>
data-x="attr-input-required">required</code> attribute; or, for <code>select</code> elements,
none of the <code>option</code> elements have their <span
data-x="concept-option-selectedness">selectedness</span> set (<code>select</code> <code
data-x="attr-select-required">required</code>).</p></dd>

<dt> <dfn>Suffering from a type mismatch</dfn> </dt>

Expand Down

0 comments on commit 5d4574d

Please sign in to comment.