[whatwg] Supporting more address levels in autocomplete

Dan Beam dbeam at chromium.org
Fri Feb 21 14:44:53 PST 2014

While internationalizing Chrome’s implementation of
requestAutocomplete(), we found that Chinese, Korean, and Thai
addresses commonly ask for [at least] 3 levels of administrative
region. For example, in this Chinese address:

  Humble Administrator’s Garden
  n°178 Dongbei Street, Gusu, Suzhou
  215001 Jiangsu

the first-level address component is “Jiangsu” (province) as it’s the
first level below country, “Suzhou” is a prefecture level city (below
province), and “Gusu” is a district of Suzhou.

To support this address format and arbitrarily many administrative
levels, we propose adding new tokens to the autocomplete spec:
address-level-n, for arbitrary n. In the above example, Jiangsu would
slot into address-level-1, Suzhou address-level-2, and Gusu
address-level-3. There would be no value returned for address-level-4.
In some other cases, address-level-1 might be a province-level city
(like Beijing), and address-level-3 might be a county-level division.
Thus we think the least confusing way to handle addresses in this type
of system is with generic indexing. See [1] for more on Chinese

The current HTML spec supports “region” and “locality”. We feel these
should remain in the spec, as they are still useful for typical
Western addresses. In a typical Western address, address-level-1 would
align with “region” and address-level-2 would align with “locality”.

Compared to the alternative of adding another one-off such as
“dependent-locality” or “sub-locality”, we feel this is a more
descriptive and general way to tackle additional administrative levels
without making false implications about the semantics of the value
that is returned.

Questions, concerns, or feedback?

Dan Beam <dbeam at chromium.org>
Evan Stade <estade at chromium.org>

[1] http://en.wikipedia.org/wiki/Administrative_divisions_of_China

More information about the whatwg mailing list