[whatwg] [Web Forms 2.0] autofocus attribute

On Mon, 14 Aug 2006 11:56:02 +0200, Ian Hickson <ian at hixie.ch> wrote:

> On Sat, 28 Jan 2006, Grey wrote:
>>
>> "Authors should avoid setting the autofocus attribute on multiple
>> enabled elements in a document. If multiple elements with the autofocus
>> attribute set are inserted into a document, each one will be processed
>> as described above, as they are inserted. This means that during
>> document load, for example, the last focusable form control in document
>> order with the attribute set will end up with the focus."
>>
>> That does not really make sense for me. Why in the world should anyone
>> want such behavior?
>
> They wouldn't. That's why authors shouldn't set it more than once.
"Shouldn't" means it is not strictly forbidden. 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.

>> 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.

> Well, it depends on the UA, but it is quite possible for the UA to have a
> concept of "focussed control" per-frame, and then the concept of a
> focussed frame, in which case this works fine.
Nice to hear that.

> 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.

> Sorry it took so long to reply.
No problem here ... I didn't expect a reply after some months, but I'm  
glad I get some anyway. I am also very sure you have got a lot of things  
to do so one subject is easy to miss.

Thank you for the reply anyways, and hoping you change the wording so this  
is transparent (if you haven't already).


Greetings,

Grey

Received on Monday, 14 August 2006 07:03:10 UTC