Skip to content
Permalink
Browse files
[giow] (1) Change how addresses are marked up for autofill, since som…
…e locales don't fit the region/locality split

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

git-svn-id: http://svn.whatwg.org/webapps@8654 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 4, 2014
1 parent 7df8ca4 commit 8db70d1387817431f2a876d032ad77f2cd0a3f29
Showing 1 changed file with 57 additions and 12 deletions.
69 source
@@ -51551,14 +51551,14 @@ out of 233&#x2009;257&#x2009;824 bytes available&lt;/meter>&lt;/p></pre>
<pre>&lt;fieldset>
&lt;legend>Ship the blue gift to...&lt;/legend>
&lt;p> &lt;label> Address: &lt;input name=ba autocomplete="section-blue shipping street-address"> &lt;/label>
&lt;p> &lt;label> City: &lt;input name=bc autocomplete="section-blue shipping region"> &lt;/label>
&lt;p> &lt;label> City: &lt;input name=bc autocomplete="section-blue shipping address-level1"> &lt;/label>
&lt;p> &lt;label> Postal Code: &lt;input name=bp autocomplete="section-blue shipping postal-code"> &lt;/label>
&lt;/fieldset>
&lt;fieldset>
&lt;legend>Ship the red gift to...&lt;/legend>
&lt;p> &lt;label> Address: &lt;input name=ra autocomplete="section-red shipping street-address"> &lt;/label>
&lt;p> &lt;label> City: &lt;input name=rc autocomplete="section-red shipping region"> &lt;/label>
&lt;p> &lt;label> Postal Code: &lt;input name=rp autocomplete="section-red shipping country"> &lt;/label>
&lt;p> &lt;label> City: &lt;input name=rc autocomplete="section-red shipping address-level1"> &lt;/label>
&lt;p> &lt;label> Postal Code: &lt;input name=rp autocomplete="section-red shipping postal-code"> &lt;/label>
&lt;/fieldset></pre>

</div>
@@ -51611,8 +51611,10 @@ out of 233&#x2009;257&#x2009;824 bytes available&lt;/meter>&lt;/p></pre>
<li>"<code data-x="attr-fe-autocomplete-address-line1">address-line1</code>"
<li>"<code data-x="attr-fe-autocomplete-address-line2">address-line2</code>"
<li>"<code data-x="attr-fe-autocomplete-address-line3">address-line3</code>"
<li>"<code data-x="attr-fe-autocomplete-locality">locality</code>"
<li>"<code data-x="attr-fe-autocomplete-region">region</code>"
<li>"<code data-x="attr-fe-autocomplete-address-level4">address-level4</code>"
<li>"<code data-x="attr-fe-autocomplete-address-level3">address-level3</code>"
<li>"<code data-x="attr-fe-autocomplete-address-level2">address-level2</code>"
<li>"<code data-x="attr-fe-autocomplete-address-level1">address-level1</code>"
<li>"<code data-x="attr-fe-autocomplete-country">country</code>"
<li>"<code data-x="attr-fe-autocomplete-country-name">country-name</code>"
<li>"<code data-x="attr-fe-autocomplete-postal-code">postal-code</code>"
@@ -51849,14 +51851,33 @@ MIT Room 32-G524
<td>
<td><span data-x="Control Group Text">Text</span>
<tr>
<td colspan=4>"<dfn data-x="attr-fe-autocomplete-locality"><code>locality</code></dfn>"
<td>City, town, village, post town, or other locality within which the relevant street address is found
<td colspan=4>"<dfn data-x="attr-fe-autocomplete-address-level2"><code>address-level4</code></dfn>"
<td>The most fine-grained <a href="#more-on-address-levels">administrative level</a>, in
addresses with four administrative levels
<td>Free-form text, no newlines
<td>
<td><span data-x="Control Group Text">Text</span>
<tr>
<td colspan=4>"<dfn data-x="attr-fe-autocomplete-address-level2"><code>address-level2</code></dfn>"
<td>The <a href="#more-on-address-levels">third administrative level</a>, in addresses with
three or more administrative levels
<td>Free-form text, no newlines
<td>
<td><span data-x="Control Group Text">Text</span>
<tr>
<td colspan=4>"<dfn data-x="attr-fe-autocomplete-address-level2"><code>address-level2</code></dfn>"
<td>The <a href="#more-on-address-levels">second administrative level</a>, in addresses with
two or more administrative levels; in the countries with two administrative levels, this would
typically be the city, town, village, or other locality within which the relevant street
address is found
<td>Free-form text, no newlines
<td>Cambridge
<td><span data-x="Control Group Text">Text</span>
<tr>
<td colspan=4>"<dfn data-x="attr-fe-autocomplete-region"><code>region</code></dfn>"
<td>Province such as a state, county, or canton within which the locality is found
<td colspan=4>"<dfn data-x="attr-fe-autocomplete-address-level1"><code>address-level1</code></dfn>"
<td>The broadest <a href="#more-on-address-levels">administrative level</a> in the address,
i.e. the province within which the locality is found; for example, in the US, this would be the
state; in Switzerland it would be the canton; the canton; in the UK, the post town
<td>Free-form text, no newlines
<td>MA
<td><span data-x="Control Group Text">Text</span>
@@ -51874,7 +51895,7 @@ MIT Room 32-G524
<td><span data-x="Control Group Text">Text</span>
<tr>
<td colspan=4>"<dfn data-x="attr-fe-autocomplete-postal-code"><code>postal-code</code></dfn>"
<td>Postal code, post code, ZIP code, CEDEX code (if CEDEX, append "CEDEX", and the <i lang="fr">arrondissement</i> if relevant, to the <code data-x="attr-fe-autocomplete-locality">locality</code> field)
<td>Postal code, post code, ZIP code, CEDEX code (if CEDEX, append "CEDEX", and the <i lang="fr">arrondissement</i>, if relevant, to the <code data-x="attr-fe-autocomplete-address-level2">address-level2</code> field)
<td>Free-form text, no newlines
<td>02139
<td><span data-x="Control Group Text">Text</span>
@@ -52151,6 +52172,21 @@ MIT Room 32-G524
data-x="attr-fe-autocomplete-off">off</code>"). If there is no <span>form owner</span>, then the
value "<code data-x="attr-fe-autocomplete-on">on</code>" is used.</p>

<hr>

<p id="more-on-address-levels"><strong>Address levels</strong>: The "<code
data-x="attr-fe-autocomplete-address-level1">address-level1</code>" &ndash; "<code
data-x="attr-fe-autocomplete-address-level4">address-level4</code>" fields are used to describe
the locality of the street address. Different locales have different numbers of levels. For
example, the US uses two levels (state and town), the UK uses one or two depending on the address
(the post town, and in some cases the locality), and China can use three (province, city,
district). The "<code data-x="attr-fe-autocomplete-address-level1">address-level1</code>" field
represents the widest administrative division. Different locales order the fields in different
ways; for example, in the US the town (level 2) precedes the state (level 1); while in Japan the
prefecture (level 1) precedes the city (level 2) which precedes the district (level 3). Authors
are encouraged to provide forms that are presented in a way that matches the country's conventions
(hiding, showing, and rearranging fields accordingly as the user changes the country).</p>


<div class="impl">

@@ -52283,11 +52319,19 @@ MIT Room 32-G524
<td>3
<td>Normal
<tr>
<td>"<code data-x="attr-fe-autocomplete-locality">locality</code>"
<td>"<code data-x="attr-fe-autocomplete-address-level4">address-level4</code>"
<td>3
<td>Normal
<tr>
<td>"<code data-x="attr-fe-autocomplete-address-level3">address-level3</code>"
<td>3
<td>Normal
<tr>
<td>"<code data-x="attr-fe-autocomplete-region">region</code>"
<td>"<code data-x="attr-fe-autocomplete-address-level2">address-level2</code>"
<td>3
<td>Normal
<tr>
<td>"<code data-x="attr-fe-autocomplete-address-level1">address-level1</code>"
<td>3
<td>Normal
<tr>
@@ -59089,6 +59133,7 @@ interface <dfn>HTMLCanvasElement</dfn> : <span>HTMLElement</span> {
has been disabled, the <code>canvas</code> element <span>represents</span> its <span>fallback
content</span> instead.</p>

<!--CLEANUP-->
<!-- CANVAS-FOCUS-FALLBACK -->
<p>When a <code>canvas</code> element <span>represents</span> <span>embedded content</span>, the
user can still focus descendants of the <code>canvas</code> element (in the <span>fallback

0 comments on commit 8db70d1

Please sign in to comment.