[whatwg] [Web Forms 2.0] autofocus attribute
Ian Hickson
ian at hixie.ch
Mon Aug 14 15:52:56 PDT 2006
On Mon, 14 Aug 2006, Grey wrote:
>
> "Shouldn't" means it is not strictly forbidden.
Indeed; there might be some valid use cases, which is why it is "should"
and not "must".
> And even if it was; the behaviour in the case authors break the rule
> isn't what I want. I want my UA to ignore anything besides the first
> "autofocus", because I think the power should belong to the user, not to
> the author.
Why the first and not the last? It is far easier to implement it as being
the last than the first.
The power here is definitely in the hands of the user. That's the whole
point of the attribute -- making it declarative allows the user to easily
override this instead of having to deal with JavaScript .focus() calls.
> > > I would appreciate to not allow multiple auto-focus attributes used
> > > in one document.
> >
> > They're not. Authors "should avoid setting the autofocus attribute on
> > multiple enabled elements in a document" means that it is wrong to do so.
>
> The wording "should" does not indicate force, but advise.
It indicates force. See RFC2119.
> > I agree it should just be one-per-page. The spec already disallows
> > more than one per page.
>
> I think the wording needs to be changed. I am very relieved though that
> you think the same.
I've changed it to "must not" so it is clear. I may change it back to
"should not" (which is nearly as strong but not quite) if someone can come
up with a legitimate reason for having it more than once.
Thanks for your input!
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list