10BC0 `autocomplete=cc-number` but for 4 separate input boxes · Issue #9927 · whatwg/html · GitHub
[go: up one dir, main page]

Skip to content

autocomplete=cc-number but for 4 separate input boxes #9927

@saschanaz

Description

@saschanaz

What is the issue with the HTML Standard?

Currently we have autocomplete=cc-number to accommodate the need to autofill the credit card numbers. Per the examples this only considers the full-number-in-one-box use case:

Field name Meaning Canonical Format Canonical Format Example Control group
"cc-number" Code identifying the payment instrument (e.g. the credit card number) ASCII digits 4114360123456785 Text

In this example the page has explicitly specified the currency and amount of the transaction. The form requests a credit card and other billing details. The user agent could use this information to suggest a credit card that it knows has sufficient balance and that supports the relevant currency.

<form method=post action="step2.cgi">
 <input type=hidden autocomplete=transaction-currency value="CHF">
 <input type=hidden autocomplete=transaction-amount value="15.00">
 <p><label>Credit card number: <input type=text inputmode=numeric autocomplete=cc-number></label>
 <p><label>Expiry Date: <input type=month autocomplete=cc-exp></label>
 <p><input type=submit value="Continue...">
</form>

Meanwhile, it seems common for websites to have 4 separate input boxes for credit card numbers:

Lufthansa-Issue.2.mov

The case where there are 4 separate input boxes for card number

Firefox since 2022 started to support such use cases, i.e. it autofills each 4-digit when there are 4 boxes with autocomplete=cc-number, but this is not standardized and is not web compatible:

  • Chrome: It autofills the same full number for all boxes
  • Safari: The autofill happens only for the selected box

Can we get a standardized autofill feature to accommodate the need for separate boxes? Perhaps autocomplete=cc-number-N to be less hacky?

A relevant Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1864395

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0