[html5] r8383 - / images

whatwg at whatwg.org whatwg at whatwg.org
Tue Jan 7 15:36:12 PST 2014


Author: ianh
Date: 2014-01-07 15:36:11 -0800 (Tue, 07 Jan 2014)
New Revision: 8383

Added:
   images/select-country-1.png
   images/select-country-2.png
Modified:
   complete.html
   index
   source
Log:
[giow] (0) Make the spec consistent on whether <select> takes autocomplete='' (it now unambiguously does; this is, I believe, a new feature that browsers don't yet support).
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23890
Affected topics: HTML

Modified: complete.html
===================================================================
--- complete.html	2014-01-07 22:18:20 UTC (rev 8382)
+++ complete.html	2014-01-07 23:36:11 UTC (rev 8383)
@@ -37478,6 +37478,7 @@
   the user reenter their information each time. For example, a field asking for the user's telephone
   number can be automatically filled with the user's phone number.</p>
 
+<!--CLEANUP-->
   <p>To help the user agent with this, the <code title=attr-fe-autocomplete><a href=#attr-fe-autocomplete>autocomplete</a></code> attribute can be used to describe the field's purpose. In the case of this form, we have
   three fields that can be usefully annotated in this way: the information about who the pizza is to
   be delivered to. Adding this information looks like this:</p>
@@ -44073,6 +44074,7 @@
    <dd>Neither tag is omissible.</dd>
    <dt><a href=#element-dfn-attributes title=element-dfn-attributes>Content attributes</a>:</dt>
    <dd><a href=#global-attributes>Global attributes</a></dd>
+   <dd><code title=attr-fe-autocomplete><a href=#attr-fe-autocomplete>autocomplete</a></code> — Hint for form autofill feature</dd>
    <dd><code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code> — Automatically focus the form control when the page is loaded</dd>
    <dd><code title=attr-fe-disabled><a href=#attr-fe-disabled>disabled</a></code> — Whether the form control is disabled</dd>
    <dd><code title=attr-fae-form><a href=#attr-fae-form>form</a></code> — Associates the control with a <code><a href=#the-form-element>form</a></code> element</dd>
@@ -44237,10 +44239,13 @@
 
   </div>
 
-  <p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to explicitly associate the
-  <code><a href=#the-select-element>select</a></code> element with its <a href=#form-owner>form owner</a>. The <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute represents the element's name. The <code title=attr-fe-disabled><a href=#attr-fe-disabled>disabled</a></code> attribute is used to make the control non-interactive and
-  to prevent its value from being submitted. The <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code>
-  attribute controls focus.</p>
+  <p>
+  The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to explicitly associate the <code><a href=#the-select-element>select</a></code> element with its <a href=#form-owner>form owner</a>.
+  The <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute represents the element's name.
+  The <code title=attr-fe-disabled><a href=#attr-fe-disabled>disabled</a></code> attribute is used to make the control non-interactive and to prevent its value from being submitted.
+  The <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code> attribute controls focus.
+  The <code title=attr-fe-autocomplete><a href=#attr-fe-autocomplete>autocomplete</a></code> attribute controls how the user agent provides autofill behavior.
+  </p>
 
   <p>A <code><a href=#the-select-element>select</a></code> element that is not <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a> is
   <i title=concept-fe-mutable><a href=#concept-fe-mutable>mutable</a></i>.</p>
@@ -47890,10 +47895,30 @@
 
    </li>
 
-  </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 -->
+  </ol><hr><p>For the purposes of autofill, a <dfn id="control's-data">control's data</dfn> depends on the kind of control:</p>
 
+  <dl><dt>An <code><a href=#the-input-element>input</a></code> element with its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute
+   in the <a href="#e-mail-state-(type=email)" title=attr-input-type-email>E-mail</a> state and with the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute specified</dt>
+
+   <dd>The element's <a href=#concept-fe-values title=concept-fe-values>values</a>.</dd>
+
+   <dt>Any other <code><a href=#the-input-element>input</a></code> element</dt>
+   <dt>A <code><a href=#the-textarea-element>textarea</a></code> element</dt>
+
+   <dd>The element's <a href=#concept-fe-values title=concept-fe-values>value</a>.</dd>
+
+   <dt>A <code><a href=#the-select-element>select</a></code> element with its <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code>
+   attribute specified</dt>
+
+   <dd>The <code><a href=#the-option-element>option</a></code> elements in the <code><a href=#the-select-element>select</a></code> element's <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> that have their <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set to true.</dd>
+
+   <dt>Any other <code><a href=#the-select-element>select</a></code> element</dt>
+
+   <dd>The <code><a href=#the-option-element>option</a></code> element in the <code><a href=#the-select-element>select</a></code> element's <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> that has its <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set to true.</dd>
+
+  </dl><hr><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 <a href="#control's-data">control's
+  data</a>, and should not offer past values to the user.</p>
+
   <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>
 
@@ -47906,9 +47931,40 @@
 
   </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 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 <a href="#control's-data">control's
+  data</a>, and may offer previously stored values to the user.</p>
 
+  <div class=example>
+
+   <p>For example, suppose a user visits a page with this control:</p>
+
+   <pre><select name="country">
+ <option>Afghanistan
+ <option>Albania
+ <option>Algeria
+ <option>Andorra
+ <option>Angola
+ <option>Antigua and Barbuda
+ <option>Argentina
+ <option>Armenia
+ <!-- <em>...</em> -->
+ <option>Yemen
+ <option>Zambia
+ <option>Zimbabwe
+</select></pre>
+
+   <p>This might render as follows:</p>
+
+   <p><img src=http://images.whatwg.org/select-country-1.png alt="A drop-down control with a long alphabetical list of countries."></p>
+
+   <p>Suppose that on the first visit to this page, the user selects "Zambia". On the second visit,
+   the user agent could duplicate the entry for Zambia at the top of the list, so that the interface
+   instead looks like this:</p>
+
+   <p><img src=http://images.whatwg.org/select-country-2.png alt="The same drop-down control with the alphabetical list of countries, but with Zambia as an entry at the top."></p>
+
+  </div>
+
   <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
   the user, e.g. based on the element's <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> value, the position
@@ -47945,13 +48001,13 @@
   <p class=example>Similarly, if a form for some reason contained both a "<code title=attr-fe-autocomplete-cc-exp><a href=#attr-fe-autocomplete-cc-exp>cc-exp</a></code>" field and a "<code title=attr-fe-autocomplete-cc-exp-month><a href=#attr-fe-autocomplete-cc-exp-month>cc-exp-month</a></code>" field, and the user agent prefilled
   the form, then the month component of the former would have to match the latter.</p>
 
+<!--CLEANUP-->
   <p>The autocompletion mechanism must be implemented by the user agent acting as if the user had
-  modified the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, and must be done at a time
+  modified the <a href="#control's-data">control's data</a>, and must be done at a time
   where the element is <i title=concept-fe-mutable><a href=#concept-fe-mutable>mutable</a></i> (e.g. just after the element has
   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
@@ -99238,6 +99294,7 @@
      <td><a href=#phrasing-content title="Phrasing content">phrasing</a></td>
      <td><code><a href=#the-option-element>option</a></code>, <code><a href=#the-optgroup-element>optgroup</a></code></td>
      <td><a href=#global-attributes title="global attributes">globals</a>;
+         <code title=attr-fe-autocomplete><a href=#attr-fe-autocomplete>autocomplete</a></code>;
          <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code>;
          <code title=attr-fe-disabled><a href=#attr-fe-disabled>disabled</a></code>;
          <code title=attr-fae-form><a href=#attr-fae-form>form</a></code>;

Added: images/select-country-1.png
===================================================================
(Binary files differ)


Property changes on: images/select-country-1.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: images/select-country-2.png
===================================================================
(Binary files differ)


Property changes on: images/select-country-2.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: index
===================================================================
--- index	2014-01-07 22:18:20 UTC (rev 8382)
+++ index	2014-01-07 23:36:11 UTC (rev 8383)
@@ -37478,6 +37478,7 @@
   the user reenter their information each time. For example, a field asking for the user's telephone
   number can be automatically filled with the user's phone number.</p>
 
+<!--CLEANUP-->
   <p>To help the user agent with this, the <code title=attr-fe-autocomplete><a href=#attr-fe-autocomplete>autocomplete</a></code> attribute can be used to describe the field's purpose. In the case of this form, we have
   three fields that can be usefully annotated in this way: the information about who the pizza is to
   be delivered to. Adding this information looks like this:</p>
@@ -44073,6 +44074,7 @@
    <dd>Neither tag is omissible.</dd>
    <dt><a href=#element-dfn-attributes title=element-dfn-attributes>Content attributes</a>:</dt>
    <dd><a href=#global-attributes>Global attributes</a></dd>
+   <dd><code title=attr-fe-autocomplete><a href=#attr-fe-autocomplete>autocomplete</a></code> — Hint for form autofill feature</dd>
    <dd><code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code> — Automatically focus the form control when the page is loaded</dd>
    <dd><code title=attr-fe-disabled><a href=#attr-fe-disabled>disabled</a></code> — Whether the form control is disabled</dd>
    <dd><code title=attr-fae-form><a href=#attr-fae-form>form</a></code> — Associates the control with a <code><a href=#the-form-element>form</a></code> element</dd>
@@ -44237,10 +44239,13 @@
 
   </div>
 
-  <p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to explicitly associate the
-  <code><a href=#the-select-element>select</a></code> element with its <a href=#form-owner>form owner</a>. The <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute represents the element's name. The <code title=attr-fe-disabled><a href=#attr-fe-disabled>disabled</a></code> attribute is used to make the control non-interactive and
-  to prevent its value from being submitted. The <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code>
-  attribute controls focus.</p>
+  <p>
+  The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to explicitly associate the <code><a href=#the-select-element>select</a></code> element with its <a href=#form-owner>form owner</a>.
+  The <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute represents the element's name.
+  The <code title=attr-fe-disabled><a href=#attr-fe-disabled>disabled</a></code> attribute is used to make the control non-interactive and to prevent its value from being submitted.
+  The <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code> attribute controls focus.
+  The <code title=attr-fe-autocomplete><a href=#attr-fe-autocomplete>autocomplete</a></code> attribute controls how the user agent provides autofill behavior.
+  </p>
 
   <p>A <code><a href=#the-select-element>select</a></code> element that is not <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a> is
   <i title=concept-fe-mutable><a href=#concept-fe-mutable>mutable</a></i>.</p>
@@ -47890,10 +47895,30 @@
 
    </li>
 
-  </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 -->
+  </ol><hr><p>For the purposes of autofill, a <dfn id="control's-data">control's data</dfn> depends on the kind of control:</p>
 
+  <dl><dt>An <code><a href=#the-input-element>input</a></code> element with its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute
+   in the <a href="#e-mail-state-(type=email)" title=attr-input-type-email>E-mail</a> state and with the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute specified</dt>
+
+   <dd>The element's <a href=#concept-fe-values title=concept-fe-values>values</a>.</dd>
+
+   <dt>Any other <code><a href=#the-input-element>input</a></code> element</dt>
+   <dt>A <code><a href=#the-textarea-element>textarea</a></code> element</dt>
+
+   <dd>The element's <a href=#concept-fe-values title=concept-fe-values>value</a>.</dd>
+
+   <dt>A <code><a href=#the-select-element>select</a></code> element with its <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code>
+   attribute specified</dt>
+
+   <dd>The <code><a href=#the-option-element>option</a></code> elements in the <code><a href=#the-select-element>select</a></code> element's <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> that have their <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set to true.</dd>
+
+   <dt>Any other <code><a href=#the-select-element>select</a></code> element</dt>
+
+   <dd>The <code><a href=#the-option-element>option</a></code> element in the <code><a href=#the-select-element>select</a></code> element's <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> that has its <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set to true.</dd>
+
+  </dl><hr><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 <a href="#control's-data">control's
+  data</a>, and should not offer past values to the user.</p>
+
   <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>
 
@@ -47906,9 +47931,40 @@
 
   </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 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 <a href="#control's-data">control's
+  data</a>, and may offer previously stored values to the user.</p>
 
+  <div class=example>
+
+   <p>For example, suppose a user visits a page with this control:</p>
+
+   <pre><select name="country">
+ <option>Afghanistan
+ <option>Albania
+ <option>Algeria
+ <option>Andorra
+ <option>Angola
+ <option>Antigua and Barbuda
+ <option>Argentina
+ <option>Armenia
+ <!-- <em>...</em> -->
+ <option>Yemen
+ <option>Zambia
+ <option>Zimbabwe
+</select></pre>
+
+   <p>This might render as follows:</p>
+
+   <p><img src=http://images.whatwg.org/select-country-1.png alt="A drop-down control with a long alphabetical list of countries."></p>
+
+   <p>Suppose that on the first visit to this page, the user selects "Zambia". On the second visit,
+   the user agent could duplicate the entry for Zambia at the top of the list, so that the interface
+   instead looks like this:</p>
+
+   <p><img src=http://images.whatwg.org/select-country-2.png alt="The same drop-down control with the alphabetical list of countries, but with Zambia as an entry at the top."></p>
+
+  </div>
+
   <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
   the user, e.g. based on the element's <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> value, the position
@@ -47945,13 +48001,13 @@
   <p class=example>Similarly, if a form for some reason contained both a "<code title=attr-fe-autocomplete-cc-exp><a href=#attr-fe-autocomplete-cc-exp>cc-exp</a></code>" field and a "<code title=attr-fe-autocomplete-cc-exp-month><a href=#attr-fe-autocomplete-cc-exp-month>cc-exp-month</a></code>" field, and the user agent prefilled
   the form, then the month component of the former would have to match the latter.</p>
 
+<!--CLEANUP-->
   <p>The autocompletion mechanism must be implemented by the user agent acting as if the user had
-  modified the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, and must be done at a time
+  modified the <a href="#control's-data">control's data</a>, and must be done at a time
   where the element is <i title=concept-fe-mutable><a href=#concept-fe-mutable>mutable</a></i> (e.g. just after the element has
   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
@@ -99238,6 +99294,7 @@
      <td><a href=#phrasing-content title="Phrasing content">phrasing</a></td>
      <td><code><a href=#the-option-element>option</a></code>, <code><a href=#the-optgroup-element>optgroup</a></code></td>
      <td><a href=#global-attributes title="global attributes">globals</a>;
+         <code title=attr-fe-autocomplete><a href=#attr-fe-autocomplete>autocomplete</a></code>;
          <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code>;
          <code title=attr-fe-disabled><a href=#attr-fe-disabled>disabled</a></code>;
          <code title=attr-fae-form><a href=#attr-fae-form>form</a></code>;

Modified: source
===================================================================
--- source	2014-01-07 22:18:20 UTC (rev 8382)
+++ source	2014-01-07 23:36:11 UTC (rev 8383)
@@ -40845,6 +40845,7 @@
   the user reenter their information each time. For example, a field asking for the user's telephone
   number can be automatically filled with the user's phone number.</p>
 
+<!--CLEANUP-->
   <p>To help the user agent with this, the <code
   data-x="attr-fe-autocomplete">autocomplete</code> attribute can be used to describe the field's purpose. In the case of this form, we have
   three fields that can be usefully annotated in this way: the information about who the pizza is to
@@ -48267,6 +48268,7 @@
    <dd>Zero or more <code>option</code>, <code>optgroup</code>, and <span data-x="script-supporting elements">script-supporting</span> elements.</dd>
    <dt><span data-x="element-dfn-attributes">Content attributes</span>:</dt>
    <dd><span>Global attributes</span></dd>
+   <dd><code data-x="attr-fe-autocomplete">autocomplete</code></dd>
    <dd><code data-x="attr-fe-autofocus">autofocus</code></dd>
    <dd><code data-x="attr-fe-disabled">disabled</code></dd>
    <dd><code data-x="attr-fae-form">form</code></dd>
@@ -48466,12 +48468,13 @@
 
   </div>
 
-  <p>The <code data-x="attr-fae-form">form</code> attribute is used to explicitly associate the
-  <code>select</code> element with its <span>form owner</span>. The <code
-  data-x="attr-fe-name">name</code> attribute represents the element's name. The <code
-  data-x="attr-fe-disabled">disabled</code> attribute is used to make the control non-interactive and
-  to prevent its value from being submitted. The <code data-x="attr-fe-autofocus">autofocus</code>
-  attribute controls focus.</p>
+  <p>
+  The <code data-x="attr-fae-form">form</code> attribute is used to explicitly associate the <code>select</code> element with its <span>form owner</span>.
+  The <code data-x="attr-fe-name">name</code> attribute represents the element's name.
+  The <code data-x="attr-fe-disabled">disabled</code> attribute is used to make the control non-interactive and to prevent its value from being submitted.
+  The <code data-x="attr-fe-autofocus">autofocus</code> attribute controls focus.
+  The <code data-x="attr-fe-autocomplete">autocomplete</code> attribute controls how the user agent provides autofill behavior.
+  </p>
 
   <p>A <code>select</code> element that is not <span data-x="concept-fe-disabled">disabled</span> is
   <i data-x="concept-fe-mutable">mutable</i>.</p>
@@ -52692,10 +52695,43 @@
 
   </ol>
 
+  <hr>
+
+  <p>For the purposes of autofill, a <dfn>control's data</dfn> depends on the kind of control:</p>
+
+  <dl>
+
+   <dt>An <code>input</code> element with its <code data-x="attr-input-type">type</code> attribute
+   in the <span data-x="attr-input-type-email">E-mail</span> state and with the <code
+   data-x="attr-input-multiple">multiple</code> attribute specified</dt>
+
+   <dd>The element's <span data-x="concept-fe-values">values</span>.</dd>
+
+   <dt>Any other <code>input</code> element</dt>
+   <dt>A <code>textarea</code> element</dt>
+
+   <dd>The element's <span data-x="concept-fe-values">value</span>.</dd>
+
+   <dt>A <code>select</code> element with its <code data-x="attr-select-multiple">multiple</code>
+   attribute specified</dt>
+
+   <dd>The <code>option</code> elements in the <code>select</code> element's <span
+   data-x="concept-select-option-list">list of options</span> that have their <span
+   data-x="concept-option-selectedness">selectedness</span> set to true.</dd>
+
+   <dt>Any other <code>select</code> element</dt>
+
+   <dd>The <code>option</code> element in the <code>select</code> element's <span
+   data-x="concept-select-option-list">list of options</span> that has its <span
+   data-x="concept-option-selectedness">selectedness</span> set to true.</dd>
+
+  </dl>
+
+  <hr>
+
   <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 -->
+  data-x="attr-fe-autocomplete-off">off</code>", the user agent should not remember the <span>control's
+  data</span>, and should not offer past values to the user.</p>
 
   <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>
@@ -52711,10 +52747,40 @@
   </div>
 
   <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 -->
+  data-x="attr-fe-autocomplete-off">off</code>", the user agent may store the <span>control's
+  data</span>, and may offer previously stored values to the user.</p>
 
+  <div class="example">
+
+   <p>For example, suppose a user visits a page with this control:</p>
+
+   <pre><select name="country">
+ <option>Afghanistan
+ <option>Albania
+ <option>Algeria
+ <option>Andorra
+ <option>Angola
+ <option>Antigua and Barbuda
+ <option>Argentina
+ <option>Armenia
+ <!-- <em>...</em> -->
+ <option>Yemen
+ <option>Zambia
+ <option>Zimbabwe
+</select></pre>
+
+   <p>This might render as follows:</p>
+
+   <p><img src="images/select-country-1.png" alt="A drop-down control with a long alphabetical list of countries."></p>
+
+   <p>Suppose that on the first visit to this page, the user selects "Zambia". On the second visit,
+   the user agent could duplicate the entry for Zambia at the top of the list, so that the interface
+   instead looks like this:</p>
+
+   <p><img src="images/select-country-2.png" alt="The same drop-down control with the alphabetical list of countries, but with Zambia as an entry at the top."></p>
+
+  </div>
+
   <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
   the user, e.g. based on the element's <code data-x="attr-fe-name">name</code> value, the position
@@ -52758,13 +52824,13 @@
   data-x="attr-fe-autocomplete-cc-exp-month">cc-exp-month</code>" field, and the user agent prefilled
   the form, then the month component of the former would have to match the latter.</p>
 
+<!--CLEANUP-->
   <p>The autocompletion mechanism must be implemented by the user agent acting as if the user had
-  modified the element's <span data-x="concept-fe-value">value</span>, and must be done at a time
+  modified the <span>control's data</span>, and must be done at a time
   where the element is <i data-x="concept-fe-mutable">mutable</i> (e.g. just after the element has
   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
@@ -110694,6 +110760,7 @@
      <td><span data-x="Phrasing content">phrasing</span></td>
      <td><code>option</code>, <code>optgroup</code></td>
      <td><span data-x="global attributes">globals</span>;
+         <code data-x="attr-fe-autocomplete">autocomplete</code>;
          <code data-x="attr-fe-autofocus">autofocus</code>;
          <code data-x="attr-fe-disabled">disabled</code>;
          <code data-x="attr-fae-form">form</code>;




More information about the Commit-Watchers mailing list