Re: [whatwg] Proposal for autocompletetype Attribute in HTML5 Specification

<CAA3nRaiAoYZYh0VnyU-1EppsLRTGrtS1i4XMqQD6GFg6KYDAFw@mail.gmail.com>

Current votes: None.

On Thu, Dec 15, 2011 at 1:17 PM, Ilya Sherman <isherman@chromium.org> wrote=
:

> Current autofill products rely on contextual clues to determine the type
> of data that should be filled into form elements. Examples of these
> contextual clues include the name of the input element, the text
> surrounding it, and placeholder text.
>
> We have discussed the shortcomings of these ad hoc approaches with
> developers of several autofill products, and all have been interested in =
a
> solution that would let website authors classify their form fields
> themselves. While current methods of field classification work in general=
,
> for many cases they are unreliable or ambiguous due to the many variation=
s
> and conventions used by web developers when creating their forms:
>
>   + Ambiguity: Fields named "name" can mean a variety of things, includin=
g
> given name, surname, full name, username, or others. Similar confusion ca=
n
> occur among other fields, such as email address and street address.
>
>   + Internationalization: Recognizing field names and context clues for
> all the world=E2=80=99s languages is impractical, time-intensive, and err=
or-prone
> (as good context clues in one language may mean something else in another
> language)
>
>   + Unrelated Naming: Due to backend requirements (such as a framework
> that a developer is working within), developers may be constrained in wha=
t
> they can name their fields. As such, the name of a field may be unrelated
> from the data it contains.
>
>
> We believe that website authors have strong incentive to facilitate
> autofill on their forms to help convert users in purchase and registratio=
n
> flows. Additionally, this assists users by streamlining their experience.
>
> To that end we would like to propose adding an autocompletetype attribute
> [1] to the HTML5 specification, as a complement to the existing
> autocomplete attribute that would eliminate ambiguity from the process of
> determining input data types.  We developed this initial draft proposal
> working together with developers or several autofill products, and are no=
w
> looking forward to feedback and suggestions from the broader community.
> [1] http://wiki.whatwg.org/wiki/Autocompletetype
>
> Thanks,
> ~Ilya Sherman, Chromium Autofill Developer
>

Copying from the "autocompletetype vs autocomplete, type attributes" thread=
:

On Thu, Jan 26, 2012 at 5:03 AM, Kornel Lesi=C5=84ski <kornel@geekhood.net>
wrote:

> How about merging autocompletetype with autocomplete then?
>
> It looks sensible to me:
>
> <input autocomplete=3Doff> <input autocomplete=3Demail>
>
> In case of <form autocomplete=3Doff><input autocomplete=3Demail></form> I=
'd
> expect autocomplete=3Demail to override form's "off" value.


I actually like this idea a lot.  We had previously chosen not to extend
the autocomplete attribute because we were worried about backward
compatibility.  In particular, we were worried that existing user agents
might interpret <input type=3D"text" autocomplete=3D"bogus"> -- and hence a=
lso
<input type=3D"text" autocomplete=3D"email"> -- to be equivalent to <input
type=3D"text" autocomplete=3D"off">.  However, I just checked with IE, Chro=
me,
Firefox, Safari, and Opera -- all simply ignore autocomplete=3D"bogus".  So=
,
we seem to be ok in terms of backward compatibility -- hooray!

If I don't see any objections over the next few days, I'll go ahead and
update the proposal to extend the autocomplete attribute rather than
introducing the additional autocompletetype attribute.