Skip to content
Permalink
Browse files
[giow] (0) Add 'country-name' field to autofill section, and some edi…
…torial polish around there.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=22286
Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@8100 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 29, 2013
1 parent 30253bf commit 43bac6178fade42de858bf6fae80cbc07e4bb869
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 18 deletions.
@@ -53910,6 +53910,7 @@ <h5 id=autofilling-form-controls:-the-autocomplete-attribute><span class=secno>4
<li>"<code title=attr-fe-autocomplete-locality><a href=#attr-fe-autocomplete-locality>locality</a></code>"
<li>"<code title=attr-fe-autocomplete-region><a href=#attr-fe-autocomplete-region>region</a></code>"
<li>"<code title=attr-fe-autocomplete-country><a href=#attr-fe-autocomplete-country>country</a></code>"
<li>"<code title=attr-fe-autocomplete-country-name><a href=#attr-fe-autocomplete-country-name>country-name</a></code>"
<li>"<code title=attr-fe-autocomplete-postal-code><a href=#attr-fe-autocomplete-postal-code>postal-code</a></code>"
<li>"<code title=attr-fe-autocomplete-cc-name><a href=#attr-fe-autocomplete-cc-name>cc-name</a></code>"
<li>"<code title=attr-fe-autocomplete-cc-given-name><a href=#attr-fe-autocomplete-cc-given-name>cc-given-name</a></code>"
@@ -54077,13 +54078,17 @@ <h5 id=autofilling-form-controls:-the-autocomplete-attribute><span class=secno>4
<td>Free-form text, no newlines
<td>Cambridge
<tr><td colspan=4>"<dfn id=attr-fe-autocomplete-region title=attr-fe-autocomplete-region><code>region</code></dfn>"
<td>Provice such as a state, county, or canton within which the locality is found
<td>Province such as a state, county, or canton within which the locality is found
<td>Free-form text, no newlines
<td>MA
<tr><td colspan=4>"<dfn id=attr-fe-autocomplete-country title=attr-fe-autocomplete-country><code>country</code></dfn>"
<td>Country
<td>Country code
<td>Valid <a href=http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm>ISO 3166-1-alpha-2 country code</a> <a href=#refsISO3166>[ISO3166]</a>
<td>US
<tr><td colspan=4>"<dfn id=attr-fe-autocomplete-country-name title=attr-fe-autocomplete-country-name><code>country-name</code></dfn>"
<td>Country name
<td>Free-form text, no newlines; <a href=#autofill-country>derived from <code title=attr-fe-autocomplete-country>country</code> in some cases</a>
<td>US
<tr><td colspan=4>"<dfn id=attr-fe-autocomplete-postal-code title=attr-fe-autocomplete-postal-code><code>postal-code</code></dfn>"
<td>Postal code, post code, ZIP code, CEDEX code (if CEDEX, append "CEDEX" to the <code title=attr-fe-autocomplete-locality><a href=#attr-fe-autocomplete-locality>locality</a></code> field)
<td>Free-form text, no newlines
@@ -54217,8 +54222,20 @@ <h5 id=autofilling-form-controls:-the-autocomplete-attribute><span class=secno>4

<p>Each <code><a href=#the-input-element>input</a></code>, <code><a href=#the-select-element>select</a></code>, and <code><a href=#the-textarea-element>textarea</a></code> element has an
<dfn id=autofill-hint-set>autofill hint set</dfn>, an <dfn id=autofill-scope>autofill scope</dfn>, an <dfn id=autofill-field-name>autofill field name</dfn>, and
an <dfn id=idl-exposed-autofill-value>IDL-exposed autofill value</dfn> whose values are defined as the result of running the
following algorithm:</p>
an <dfn id=idl-exposed-autofill-value>IDL-exposed autofill value</dfn>.</p>

<p>The <a href=#autofill-field-name>autofill field name</a> specifies the specific kind of data expected in the field,
e.g. "<code title=attr-fe-autocomplete-street-address><a href=#attr-fe-autocomplete-street-address>street-address</a></code>" or "<code title=attr-fe-autocomplete-cc-exp><a href=#attr-fe-autocomplete-cc-exp>cc-exp</a></code>".</p>

<p>The <a href=#autofill-hint-set>autofill hint set</a> identifies what address or contact information type the user
agent is to look at, e.g. "<code title=attr-fe-autocomplete-shipping><a href=#attr-fe-autocomplete-shipping>shipping</a></code> <code title=attr-fe-autocomplete-fax><a href=#attr-fe-autocomplete-fax>fax</a></code>" or "<code title=attr-fe-autocomplete-billing><a href=#attr-fe-autocomplete-billing>billing</a></code>".</p>

<p>The <a href=#autofill-scope>autofill scope</a> identifies the group of fields that are to be filled with the
information from the same source, and consists of the <a href=#autofill-hint-set>autofill hint set</a> with, if
applicable, the "<code title="">section-*</code>" prefix, e.g. "billing", "<code title="">section-parent shipping</code>", or "<code title="">section-child home
shipping</code>".</p>

<p>These values are defined as the result of running the following algorithm:</p>

<ol><li><p>If the element has no <code title=attr-fe-autocomplete><a href=#attr-fe-autocomplete>autocomplete</a></code> attribute, then
jump to the step labeled <i>default</i>.</li>
@@ -54300,6 +54317,9 @@ <h5 id=autofilling-form-controls:-the-autocomplete-attribute><span class=secno>4
<tr><td>"<code title=attr-fe-autocomplete-country><a href=#attr-fe-autocomplete-country>country</a></code>"
<td>3
<td>Normal
<tr><td>"<code title=attr-fe-autocomplete-country-name><a href=#attr-fe-autocomplete-country-name>country-name</a></code>"
<td>3
<td>Normal
<tr><td>"<code title=attr-fe-autocomplete-postal-code><a href=#attr-fe-autocomplete-postal-code>postal-code</a></code>"
<td>3
<td>Normal
@@ -54569,9 +54589,14 @@ <h5 id=autofilling-form-controls:-the-autocomplete-attribute><span class=secno>4
controls whose <a href=#autofill-hint-set>autofill hint set</a> does not contain
either keyword.</p>

<p>When the user agent prefills form controls, elements with the same <a href=#form-owner>form owner</a> and
<p>When the user agent autofills form controls, elements with the same <a href=#form-owner>form owner</a> and
the same <a href=#autofill-scope>autofill scope</a> must use data relating to the same person, address, payment
instrument, and contact details.</p>
instrument, and contact details. <span id=autofill-country title="">When a user agent autofills
"<code title=attr-fe-autocomplete-country><a href=#attr-fe-autocomplete-country>country</a></code>" and "<code title=attr-fe-autocomplete-country-name><a href=#attr-fe-autocomplete-country-name>country-name</a></code>" fields with the same <a href=#form-owner>form
owner</a> and <a href=#autofill-scope>autofill scope</a>, and the user agent has a value for the <code title=attr-fe-autocomplete-country><a href=#attr-fe-autocomplete-country>country</a></code>" field(s), then the "<code title=attr-fe-autocomplete-country-name><a href=#attr-fe-autocomplete-country-name>country-name</a></code>" field(s) must be filled using a
human-readable name for the same country.</span> When a user agent fills in multiple fields at
once, all fields with the same <a href=#autofill-field-name>autofill field name</a>, <a href=#form-owner>form owner</a> and
<a href=#autofill-scope>autofill scope</a> must be filled with the same value.</p>

<p class=example>Suppose a user agent knows of two phone numbers,
+1 555 123 1234 and +1 555 666 7777. It would not be conforming for
37 index
@@ -53910,6 +53910,7 @@ out of 233&thinsp;257&thinsp;824 bytes available&lt;/meter&gt;&lt;/p&gt;</pre>
<li>"<code title=attr-fe-autocomplete-locality><a href=#attr-fe-autocomplete-locality>locality</a></code>"
<li>"<code title=attr-fe-autocomplete-region><a href=#attr-fe-autocomplete-region>region</a></code>"
<li>"<code title=attr-fe-autocomplete-country><a href=#attr-fe-autocomplete-country>country</a></code>"
<li>"<code title=attr-fe-autocomplete-country-name><a href=#attr-fe-autocomplete-country-name>country-name</a></code>"
<li>"<code title=attr-fe-autocomplete-postal-code><a href=#attr-fe-autocomplete-postal-code>postal-code</a></code>"
<li>"<code title=attr-fe-autocomplete-cc-name><a href=#attr-fe-autocomplete-cc-name>cc-name</a></code>"
<li>"<code title=attr-fe-autocomplete-cc-given-name><a href=#attr-fe-autocomplete-cc-given-name>cc-given-name</a></code>"
@@ -54077,13 +54078,17 @@ MIT Room 32-G524
<td>Free-form text, no newlines
<td>Cambridge
<tr><td colspan=4>"<dfn id=attr-fe-autocomplete-region title=attr-fe-autocomplete-region><code>region</code></dfn>"
<td>Provice such as a state, county, or canton within which the locality is found
<td>Province such as a state, county, or canton within which the locality is found
<td>Free-form text, no newlines
<td>MA
<tr><td colspan=4>"<dfn id=attr-fe-autocomplete-country title=attr-fe-autocomplete-country><code>country</code></dfn>"
<td>Country
<td>Country code
<td>Valid <a href=http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm>ISO 3166-1-alpha-2 country code</a> <a href=#refsISO3166>[ISO3166]</a>
<td>US
<tr><td colspan=4>"<dfn id=attr-fe-autocomplete-country-name title=attr-fe-autocomplete-country-name><code>country-name</code></dfn>"
<td>Country name
<td>Free-form text, no newlines; <a href=#autofill-country>derived from <code title=attr-fe-autocomplete-country>country</code> in some cases</a>
<td>US
<tr><td colspan=4>"<dfn id=attr-fe-autocomplete-postal-code title=attr-fe-autocomplete-postal-code><code>postal-code</code></dfn>"
<td>Postal code, post code, ZIP code, CEDEX code (if CEDEX, append "CEDEX" to the <code title=attr-fe-autocomplete-locality><a href=#attr-fe-autocomplete-locality>locality</a></code> field)
<td>Free-form text, no newlines
@@ -54217,8 +54222,20 @@ MIT Room 32-G524

<p>Each <code><a href=#the-input-element>input</a></code>, <code><a href=#the-select-element>select</a></code>, and <code><a href=#the-textarea-element>textarea</a></code> element has an
<dfn id=autofill-hint-set>autofill hint set</dfn>, an <dfn id=autofill-scope>autofill scope</dfn>, an <dfn id=autofill-field-name>autofill field name</dfn>, and
an <dfn id=idl-exposed-autofill-value>IDL-exposed autofill value</dfn> whose values are defined as the result of running the
following algorithm:</p>
an <dfn id=idl-exposed-autofill-value>IDL-exposed autofill value</dfn>.</p>

<p>The <a href=#autofill-field-name>autofill field name</a> specifies the specific kind of data expected in the field,
e.g. "<code title=attr-fe-autocomplete-street-address><a href=#attr-fe-autocomplete-street-address>street-address</a></code>" or "<code title=attr-fe-autocomplete-cc-exp><a href=#attr-fe-autocomplete-cc-exp>cc-exp</a></code>".</p>

<p>The <a href=#autofill-hint-set>autofill hint set</a> identifies what address or contact information type the user
agent is to look at, e.g. "<code title=attr-fe-autocomplete-shipping><a href=#attr-fe-autocomplete-shipping>shipping</a></code> <code title=attr-fe-autocomplete-fax><a href=#attr-fe-autocomplete-fax>fax</a></code>" or "<code title=attr-fe-autocomplete-billing><a href=#attr-fe-autocomplete-billing>billing</a></code>".</p>

<p>The <a href=#autofill-scope>autofill scope</a> identifies the group of fields that are to be filled with the
information from the same source, and consists of the <a href=#autofill-hint-set>autofill hint set</a> with, if
applicable, the "<code title="">section-*</code>" prefix, e.g. "billing", "<code title="">section-parent shipping</code>", or "<code title="">section-child home
shipping</code>".</p>

<p>These values are defined as the result of running the following algorithm:</p>

<ol><li><p>If the element has no <code title=attr-fe-autocomplete><a href=#attr-fe-autocomplete>autocomplete</a></code> attribute, then
jump to the step labeled <i>default</i>.</li>
@@ -54300,6 +54317,9 @@ MIT Room 32-G524
<tr><td>"<code title=attr-fe-autocomplete-country><a href=#attr-fe-autocomplete-country>country</a></code>"
<td>3
<td>Normal
<tr><td>"<code title=attr-fe-autocomplete-country-name><a href=#attr-fe-autocomplete-country-name>country-name</a></code>"
<td>3
<td>Normal
<tr><td>"<code title=attr-fe-autocomplete-postal-code><a href=#attr-fe-autocomplete-postal-code>postal-code</a></code>"
<td>3
<td>Normal
@@ -54569,9 +54589,14 @@ MIT Room 32-G524
controls whose <a href=#autofill-hint-set>autofill hint set</a> does not contain
either keyword.</p>

<p>When the user agent prefills form controls, elements with the same <a href=#form-owner>form owner</a> and
<p>When the user agent autofills form controls, elements with the same <a href=#form-owner>form owner</a> and
the same <a href=#autofill-scope>autofill scope</a> must use data relating to the same person, address, payment
instrument, and contact details.</p>
instrument, and contact details. <span id=autofill-country title="">When a user agent autofills
"<code title=attr-fe-autocomplete-country><a href=#attr-fe-autocomplete-country>country</a></code>" and "<code title=attr-fe-autocomplete-country-name><a href=#attr-fe-autocomplete-country-name>country-name</a></code>" fields with the same <a href=#form-owner>form
owner</a> and <a href=#autofill-scope>autofill scope</a>, and the user agent has a value for the <code title=attr-fe-autocomplete-country><a href=#attr-fe-autocomplete-country>country</a></code>" field(s), then the "<code title=attr-fe-autocomplete-country-name><a href=#attr-fe-autocomplete-country-name>country-name</a></code>" field(s) must be filled using a
human-readable name for the same country.</span> When a user agent fills in multiple fields at
once, all fields with the same <a href=#autofill-field-name>autofill field name</a>, <a href=#form-owner>form owner</a> and
<a href=#autofill-scope>autofill scope</a> must be filled with the same value.</p>

<p class=example>Suppose a user agent knows of two phone numbers,
+1 555 123 1234 and +1 555 666 7777. It would not be conforming for
46 source
@@ -59355,6 +59355,7 @@ out of 233&#x2009;257&#x2009;824 bytes available&lt;/meter>&lt;/p></pre>
<li>"<code title="attr-fe-autocomplete-locality">locality</code>"
<li>"<code title="attr-fe-autocomplete-region">region</code>"
<li>"<code title="attr-fe-autocomplete-country">country</code>"
<li>"<code title="attr-fe-autocomplete-country-name">country-name</code>"
<li>"<code title="attr-fe-autocomplete-postal-code">postal-code</code>"
<li>"<code title="attr-fe-autocomplete-cc-name">cc-name</code>"
<li>"<code title="attr-fe-autocomplete-cc-given-name">cc-given-name</code>"
@@ -59561,14 +59562,19 @@ MIT Room 32-G524
<td>Cambridge
<tr>
<td colspan=4>"<dfn title="attr-fe-autocomplete-region"><code>region</code></dfn>"
<td>Provice such as a state, county, or canton within which the locality is found
<td>Province such as a state, county, or canton within which the locality is found
<td>Free-form text, no newlines
<td>MA
<tr>
<td colspan=4>"<dfn title="attr-fe-autocomplete-country"><code>country</code></dfn>"
<td>Country
<td>Country code
<td>Valid <a href="http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm">ISO 3166-1-alpha-2 country code</a> <a href="#refsISO3166">[ISO3166]</a>
<td>US
<tr>
<td colspan=4>"<dfn title="attr-fe-autocomplete-country-name"><code>country-name</code></dfn>"
<td>Country name
<td>Free-form text, no newlines; <a href="#autofill-country">derived from <code title="attr-fe-autocomplete-country">country</code> in some cases</a>
<td>US
<tr>
<td colspan=4>"<dfn title="attr-fe-autocomplete-postal-code"><code>postal-code</code></dfn>"
<td>Postal code, post code, ZIP code, CEDEX code (if CEDEX, append "CEDEX" to the <code title="attr-fe-autocomplete-locality">locality</code> field)
@@ -59738,8 +59744,24 @@ MIT Room 32-G524

<p>Each <code>input</code>, <code>select</code>, and <code>textarea</code> element has an
<dfn>autofill hint set</dfn>, an <dfn>autofill scope</dfn>, an <dfn>autofill field name</dfn>, and
an <dfn>IDL-exposed autofill value</dfn> whose values are defined as the result of running the
following algorithm:</p>
an <dfn>IDL-exposed autofill value</dfn>.</p>

<p>The <span>autofill field name</span> specifies the specific kind of data expected in the field,
e.g. "<code title="attr-fe-autocomplete-street-address">street-address</code>" or "<code
title="attr-fe-autocomplete-cc-exp">cc-exp</code>".</p>

<p>The <span>autofill hint set</span> identifies what address or contact information type the user
agent is to look at, e.g. "<code title="attr-fe-autocomplete-shipping">shipping</code> <code
title="attr-fe-autocomplete-fax">fax</code>" or "<code
title="attr-fe-autocomplete-billing">billing</code>".</p>

<p>The <span>autofill scope</span> identifies the group of fields that are to be filled with the
information from the same source, and consists of the <span>autofill hint set</span> with, if
applicable, the "<code title="">section-*</code>" prefix, e.g. "billing", "<code
title="">section-parent shipping</code>", or "<code title="">section-child home
shipping</code>".</p>

<p>These values are defined as the result of running the following algorithm:</p>

<ol>

@@ -59850,6 +59872,10 @@ MIT Room 32-G524
<td>"<code title="attr-fe-autocomplete-country">country</code>"
<td>3
<td>Normal
<tr>
<td>"<code title="attr-fe-autocomplete-country-name">country-name</code>"
<td>3
<td>Normal
<tr>
<td>"<code title="attr-fe-autocomplete-postal-code">postal-code</code>"
<td>3
@@ -60192,9 +60218,17 @@ MIT Room 32-G524
controls whose <span>autofill hint set</span> does not contain
either keyword.</p>

<p>When the user agent prefills form controls, elements with the same <span>form owner</span> and
<p>When the user agent autofills form controls, elements with the same <span>form owner</span> and
the same <span>autofill scope</span> must use data relating to the same person, address, payment
instrument, and contact details.</p>
instrument, and contact details. <span id="autofill-country" title="">When a user agent autofills
"<code title="attr-fe-autocomplete-country">country</code>" and "<code
title="attr-fe-autocomplete-country-name">country-name</code>" fields with the same <span>form
owner</span> and <span>autofill scope</span>, and the user agent has a value for the <code
title="attr-fe-autocomplete-country">country</code>" field(s), then the "<code
title="attr-fe-autocomplete-country-name">country-name</code>" field(s) must be filled using a
human-readable name for the same country.</span> When a user agent fills in multiple fields at
once, all fields with the same <span>autofill field name</span>, <span>form owner</span> and
<span>autofill scope</span> must be filled with the same value.</p>

<p class="example">Suppose a user agent knows of two phone numbers,
+1 555 123 1234 and +1 555 666 7777. It would not be conforming for

0 comments on commit 43bac61

Please sign in to comment.