|
Ian Hickson wrote: Basically that autocomplete on passwords works different from other inputs.On Mon, 31 Aug 2009, John Snyders wrote:I have a few comments on the autocomplete attribute section 4.10.4.2.1 I went back and read what Microsoft has to say about autocomplete (since they started this). The MSDN topic "Using AutoComplete in HTML Forms" says: "The AutoComplete feature does not operate in the same fashion with password fields as with regular text fields." The whole autocomplete section starts off with an assumption that we all know what the auto complete browser feature is, which we do. But someone that just arrived on this planet wouldn't know from the spec what the autocomplete attribute controls. An intro such as this may help: User agents may have a feature that remembers and later prefills input values. The autocomplete attribute allows sites to make recommendations about how this feature treats input values. Then describe the states and their meaning. Then make the distinction about autocomplete on a password field. Remembered values for passwords are treated differently. A password value is not stored on its own but is paired with a user name or id to make a credential. If a password input cannot be associated with another input to make a credential then it must not be stored. The autocomplete state on a password input controls the remembering of the credentials. But this is where my testing of current browser behavior shows that there is disagreement. Safari and Opera seem to ignore autocomplete on password and use it on the username to control remembering credentials. I don't like the idea of using autocomplete on username to control remembering credentials because it possible (perhaps even desireable) that you want to remember credentials but you don't want to be presented with a list of previous usernames to pick from. I think that means that Chrome works exactly as I would expect in this regard. Yes there is an important distinction between the HTML5 standard and implementations. And the standard should not go too far into the details. However there are already many places where the spec makes recommendations about what the UA should or may do. In this section alone there is an implied recommendation in "...the user can expect to be able to rely on his user agent to remember values..." when in fact there is no rule that a UA has to implement any kind of auto complete or credentials remembering feature. The last paragraph makes it clear that the UA may put the user in full control of this functionality. It also specifies how the elements value is modified when a remembered value is chosen. I don't want to say exactly how to store the data but just to characterize the data as sensitive/private. How about adding something like: A user agent may store information entered into inputs (just the inputs that support autocomplete attribute right?) for the benefit of the user when filling out that input or ones like it in the future unless the resulting autocomplete state is off. How stored values are associated with an input is up to the user agent. The stored information must never be made available through the DOM or any other API. A user agent should consider that even when the autocomplete state is on the user may still consider the information stored to be sensitive so appropriate security measures should be taken to protect the data. If storing passwords as part of credentials they must be considered highly sensitive. Agree this comment is more for the browser vendors than the spec. Thats OK as long as the distinction is made about passwords in the beginning. I just want the semantics of autocomplete attribute to be clear. You can't just say there's an autocomplete attribute use it for whatever you like (not that the spec does but it can do better). I understand not wanting to have too many examples and agree that autocomplete isn't used often in practice. My concern is to make sure people know what autocomplete means so they will use it appropriately. Probably one example is fine.
Here it is: When an input
element's autocomplete
attribute is in the on state, when an input
element's autocomplete
attribute is in the default state, and
the element has no form owner,
and when an input
element's autocomplete
attribute is in the default state, and
the element's form owner's
autocomplete
attribute is in the on state, the input
element's resulting
autocompletion state is on. Otherwise, the input
element's resulting
autocompletion state is off.Here is what what I think it should be: When an input
element's autocomplete
attribute is:- in the on state, or - when an input
element's autocomplete
attribute is in the default state, and
the element has no form owner,
or- when an input
element's autocomplete
attribute is in the default state, and
the element's form owner's
autocomplete
attribute is in the on state, the input
element's resulting
autocompletion state is on. Otherwise, the input
element's resulting
autocompletion state is off.I also wonder if the 3rd case should be: - when an input
element's autocomplete
attribute is in the default state, and
the element's form owner's
resulting autocomplete
state is on, Microsoft documentation says any value other than off means on but I prefer they way HTML5 spec is specific that the values are on and off. Thanks, -John |
- comment about autocomplete and saving credentials John Snyders
- Re: comment about autocomplete and saving credentials Ian Hickson
- Re: comment about autocomplete and saving credential... John Snyders
