Skip to content

autocomplete attribute for street-address details #4986

Open

Description

@battre

Currently the HTML Standard seems a bit US centric:

The autocomplete attribute supports the street-address type for an unstructured street address or address-line1, address-line2 and address-line3 for the respective lines.

In Germany and several other countries, websites typically ask for the street name and a house number. In Spain, websites ask for the floor number and door number (I am not a Spanish speaker, I have seen "Num.", "Piso", "Letra", "Esc." on simyo.es for example). Some Brazilian sites ask for a neighborhood (which we might express with an address-levelX but that might be a bit underspecified because I am not aware of a canonical mapping of entities in specific countries).

Should we start a discussion on defining more entities around addresses? I think that just by supporting a street-name, house-number and apartment-number, we could cover a lot of ground.

Activity

  1. added
    addition/proposal
    topic: forms
    on Oct 8, 2019
  2. annevk commented on Oct 8, 2019

    @annevk
    Member
  3. carstenhag commented on Oct 13, 2019

    @carstenhag

    Chrome seems to somehow fill it correctly sometimes, see https://i.imgur.com/QRNxfXL.png (segmueller.de).

    This is very rare though and probably depends on the ID's given. Usually, I'd say with a 90% probability, the "street" field from forms gets filled with the street name and the house number.
    The house number field is then empty and I have to manually edit it, which is unfortunate and could be fixed via the spec.

    @annevk / maintainers: Do you need any example websites to show/clarify the issue?

  4. sideshowbarker commented on Oct 14, 2019

    @sideshowbarker
    Member

    In Japan, we don’t even have street addresses. Instead, the equivalent is a series of numbers that starts with a district number, and then a block number, and then what’s nominally a specific building number.

    I say “nominally” because it’s common for several buildings to actually have the same “building number” (due, e.g., to cases where an older, larger building on a piece of land gets demolished and replaced with two or more smaller buildings on the same land).

    So in Japan, in addition to a “building number”, it’s often also necessary to also specify a building name.

    When the autocomplete attribute was being defined, I remember we specifically discussed the Japanese-addressing case — as well as other locales/cases with addressing schemes that don’t use street names or that need something more specific than a street address — and (as far as I recall), the relevant set of tokens now in the spec were decided on because trying to define a richer set of tokens to reflect all the possible cases/locales would have ended up with a set that was just too unwieldy in practice.

  5. added
    needs implementer interest
    on Oct 14, 2019
  6. annevk commented on Oct 14, 2019

    @annevk
    Member

    @carstenhag I think we mainly need to hear from implementers to what extent they are interested in putting work into this as this would also require UI that's aware that if you change the country the address format changes. (E.g., Firefox only supports a single address field at the moment as far as I can tell.)

  7. battre commented on Oct 14, 2019

    @battre
    Author

    Thank you for sharing the historic context. I appreciate that there is a lot of complexity in international addresses that I am not aware of.

    I wonder whether we can still come up with a practical solution that addresses the problem that websites put street and house number into separate fields. We have looked at a few hundred websites in Brazil, Spain, France, Germany and India (focused on non-US websites; acknowledging that this is by no means a representative sample) and noticed this challenge quite frequently in all of these countries but India.

    Assuming that websites do not change their UI to support the autocomplete attribute, I wonder how we feel about adding special cases for "a lot but not all countries". I would propose that addresses are too complex to cover all countries with all nuances so we can only get closer to "correct" but never reach it 100%.

    Another syntactic idea I had was to go with sub-attributes. Something like
    address-line1[street-name] and address-line1[house-number]. Would you feel different about this?
    This could also be used for #4987 as a format specifier cc-exp[mm/yy] to express an expiration in format "MM/YY".

    @annevk Regarding implementer interest: I am working for Google on Chrome.

  8. battre commented on Oct 14, 2019

    @battre
    Author

    @rmondello Do you know anybody who works in this space on WebKit?

  9. added
    i18n-tracker
    on Oct 14, 2019
  10. annevk commented on Oct 14, 2019

    @annevk
    Member

    cc @whatwg/i18n

  11. xfq commented on Oct 14, 2019

    @xfq
    Contributor

    FWIW, this may also affect the purpose attribute in APA's Personalization work.

  12. added
    accessibility
    on Oct 14, 2019
  13. annevk commented on Oct 14, 2019

    @annevk
    Member

    cc @whatwg/a11y per above comment. Does make me wonder how many attributes we need to state the same thing.

  14. littledan commented on Oct 14, 2019

    @littledan
    Contributor

    @rxaviers and I were chatting about internationalized address formatting. I wonder if the JavaScript Intl API could help by giving data about the required fields for a locale. @sffc

  15. 35 remaining items

  16. smaug---- commented on Nov 9, 2022

    @smaug----
  17. removed
    agenda+
    on Nov 11, 2022
  18. annevk commented on Nov 14, 2022

    @annevk
    Member

    In principle we're interested in this. Please keep me in the loop. I'll also file some issues on the repository.

  19. battre commented on Nov 14, 2022

    @battre
    Author

    Great! For planning purposes: Would you be interested in joining a 1/2 day workshop to discuss this in person and go a bit deeper?

  20. annevk commented on Nov 15, 2022

    @annevk
    Member

    I may or may not be the person that participates, but I'm the person you want to keep in the loop as you go about organizing it. 😊

  21. mathias22osterhagen22 commented on Nov 28, 2022

    @mathias22osterhagen22

    @mnoorenberghe

    Do we have any evidence that the sites that currently use separate fields for these values actually require them to be separate fields? Or is it just a local preference?

    Yes. By example for third party website it's necessary to send the number of the street separately (like sumsub). For banking purpose as well, better to keep each part of the address distinctly to easier screening processes.

  22. romane-echino commented on Dec 21, 2022

    @romane-echino

    If I can add something to the fact that street-name and house-number should be separated and that end-users should now slowely take that habit is because of the new international standard ISO 20022 about payment standards.

    That standard has been voted in Europe and currently in production in Switzerland. One part of that new standard is the QR-Invoice (only in switzerland atm) which contains all payment informations inside a 2d qr code. In the documentation the house-number is on another line than the street-name. It was a lot of pain for invoicing software (like us) to translate every address field to two field (I mean regexp doesn't cover 100% of the cases since people write addresses in so many ways...).

  23. battre commented on Dec 21, 2022

    @battre
    Author

    Thanks for sharing! Are there any other fields that ISO 20022 wants to treat specially? Apartment/Unit numbers? Floors? Staircases? Entrances? How do they deal with countries that rely on building names?

  24. battre commented on Dec 21, 2022

    @battre
    Author

    Is it this?

        <xs:complexType name="PostalAddress24">
            <xs:sequence>
                <xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType3Choice"/>
                <xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
                <xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/>
                <xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/>
                <xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/>
                <xs:element maxOccurs="1" minOccurs="0" name="BldgNm" type="Max35Text"/>
                <xs:element maxOccurs="1" minOccurs="0" name="Flr" type="Max70Text"/>
                <xs:element maxOccurs="1" minOccurs="0" name="PstBx" type="Max16Text"/>
                <xs:element maxOccurs="1" minOccurs="0" name="Room" type="Max70Text"/>
                <xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/>
                <xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/>
                <xs:element maxOccurs="1" minOccurs="0" name="TwnLctnNm" type="Max35Text"/>
                <xs:element maxOccurs="1" minOccurs="0" name="DstrctNm" type="Max35Text"/>
                <xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/>
                <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
                <xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/>
            </xs:sequence>
        </xs:complexType>
    

    (Found on https://www.iso20022.org/iso-20022-message-definitions?business-domain=1 in "Payments Mandates")

  25. romane-echino commented on Dec 21, 2022

    @romane-echino

    @battre Yep that's exactly it! How fast 😄
    I'm not an expert in that new standard so... for now... I don't see any other major problem. But as usual future is gonna prove me wrong 😄

    Here is some documentation derived from the ISO 20022 standard for switzerland :

    Element Example: Structured Example: Combined Remarks
    Address type “S” “K” “S” - Structured address “K” - Combined address
    Name Pia-Maria RutschmannSchnyder Pia-Maria RutschmannSchnyder
    Street or address line 1 Grosse Marktgasse Grosse Marktgasse 28 “S” - Street/P.O. Box “K” - Street and building number of P.O. Box
    Building number or address line 2 28 9400 Rorschach “S” - Building number “K” - Postal code and town
    Postal code 9400 “S” - Postal code “K” - Do not fill in
    Town Rorschach “S” – Town “K” - Do not fill in
    Country CH CH

    Found on https://www.paymentstandards.ch/dam/downloads/ig-qr-bill-en.pdf in "4.3.1 Use of address information"

    Some of our banks only support the Structured address standard and because of that it has to be separated

  26. battre commented on Dec 22, 2022

    @battre
    Author

    I am organizing a virtual workshop on the topic of improving the autocomplete attribute.

    Date: January 17, 2023
    Time: 7 AM - 9 AM PT (US West Coast), 4 PM - 6 PM GMT+1 (Germany), 9 PM - 11 PM GMT+5:30 (India)

    The purpose of this workshop is to

    • build a mutual understanding of the problem space
    • align on a strategy and determine stakeholders who are interested in contributing to the execution or serve as advisors.

    It should serve as a foundation for creating a workstream on this topic afterwards.

    If anybody would like to be invited, please email me at [email protected] with a one sentence summary of your affiliation and why you are interested in joining.

  27. battre commented on Feb 2, 2023

    @battre
    Author

    A big thank you to all the participants.

    The meetings notes can be found here.

    If you would like to contribute to this topic in the next weeks, please register here. I would like to set up a bi-weekly meeting to make progress in this space.

  28. r12a commented on Feb 3, 2023

    @r12a

    FWIW [ In the workshop report international name changes were mentioned a few times. I got the impression that that is not a focus of the work here, so i mention this only in passing – but since it came up a few times i thought i should note that the issues with capturing, storing, and presenting personal names are much bigger than the problem with Hispanic family names. If you want a glimpse of some additional aspects to consider see Personal names around the world. ]

  29. momdo commented on Feb 4, 2023

    @momdo
    Contributor
  30. battre commented on May 11, 2023

    @battre
    Author

    I have proposed some fundamental principles for how we could move forward for this here: https://github.com/battre/autocomplete-attribute-explainer/

    I would appreciate feedback (either here or in the issues I have created for the individual sections).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilityaddition/proposali18n-trackerneeds implementer interesttopic: forms

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions