requestAutocomplete [1], for those unfamiliar with the API, is a proposed addition to the HTML spec where browser vendors show a dialog to users for populating payment and address fields on a page. Payment and address autocomplete profiles can be created by the user, where the user fills in individual fields in a native dialog, much like the fields on a web page.
Currently, the autocomplete spec [2] includes only locality and region as administrative levels for postal addresses. According to the long discussion thread at [3], some countries, such as China, have three (and soon four) administrative levels. As a result, there is a whatwg proposal [4] to extend the number of autocomplete administrative levels from two to four. These changes need to be reflected in the requestAutocomplete dialog, which will introduce quite a bit of complexity. If we agree with this proposal: Do we have the resources to build our own database of mappings from countries to their administrative levels for postal addresses? For example, a US localizer would indicate that US addresses require the city and state administrative levels, and a Chinese localizer would indicate that Chinese addresses require a provincial level, a prefectural level, and a county level. In addition to the knowing what administrative levels each country uses, we would also need labels for these country-specific levels. For example, an en-US localizer would need to be able to provide the terms "city" and "state" for US addresses; "province" for Canadian addresses; "prefecture", "county", and "village" for Chinese addresses; along with any other terms used by other countries. In short, every localizer would need to be able to translate every other countries' administrative levels. There are existing libraries that can transform tokenized fields to postal-compatible blobs; engineers at Google have referred us to libaddressinput [5]. However, this API seems incomplete. For example, the CN query at [6] lists only city and state as required administrative levels, whereas the comments at [3] suggest that there should be three. If we disagree with this proposal: What alternatives do we have? Given that countries require more than two administrative levels in postal address, it seems our options are limited. We can't simply provide a single blob for an entire address as sites generally require more tokenized information. Thanks, Brian [1] http://www.html5rocks.com/en/tutorials/forms/requestautocomplete/ [2] http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#autofilling-form-controls:-the-autocomplete-attribute [3] http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2014-March/084394.html [4] https://www.w3.org/Bugs/Public/show_bug.cgi?id=25235 [5] https://code.google.com/p/libaddressinput/ [6] http://i18napis.appspot.com/address/data/CN _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform