W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2014

[whatwg] Supporting more address levels in autocomplete

From: Dan Beam <dbeam@chromium.org>
Date: Fri, 21 Feb 2014 14:44:53 -0800
Message-ID: <CANpe7K3Gm5WARyGwcowutFFntUvtNMwK5mu8Q54DioAiaHQ1jQ@mail.gmail.com>
To: WHATWG <whatwg@whatwg.org>
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
  China

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
addresses.

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@chromium.org>
Evan Stade <estade@chromium.org>

[1] http://en.wikipedia.org/wiki/Administrative_divisions_of_China
Received on Friday, 21 February 2014 22:45:39 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:16 UTC