Developer fixes Chrome credit card autofill bug triggered by French word in form label

A developer discovered that Chrome and Android's Autofill Manager were incorrectly suggesting saved credit cards on an order-number field in a form, because the French label 'Numéro de commande' semantically resembled a card number field. Chrome deliberately ignores the autocomplete='off' attribute for payment-related fields, a documented behavior stemming from widespread misuse of the attribute on real checkout forms. Standard fixes like maxlength and inputmode='numeric' did not resolve the false positive, as Chrome's classifier performs semantic matching on label text rather than relying solely on HTML attributes. The team resolved the issue by inserting an invisible Unicode Zero Width Space (U+200B) character at the midpoint of longer words in the label, breaking the keyword pattern without altering the visual display. The developers cautioned that the fix's impact on screen readers remains untested, and advised others to treat it as a workaround rather than a fully verified accessibility-safe solution.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in