'Why Chrome autocomplete base on name/id, but not on input type

I always thought that setting type="tel" on an <input> is enough for autocomplete. Turn out not true:

Open MDN's <input type="tel"> page, look at the example. If I remove both name="phone" and id="phone", autocomplete does not work. If I remove either of them, autocomplete still works.

I think it could be considered invalid, then I add both of them, but use a different value, not phone. Autocomplete still does not work.

So maybe Chrome "guesses" what to fill bases on the name/id. My question is why they do that. Why doesn't it fill for type="tel" alone?

I use latest Chrome.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source