[whatwg] comment on autofocus attribute from Web Forms 2.0 spec

Anne van Kesteren annevk at opera.com
Mon Jun 16 12:26:37 PDT 2008

On Mon, 16 Jun 2008 21:17:18 +0200, Adele Peterson <adele at apple.com> wrote:
> In HTML5, focus() and blur() are now defined on HTMLElement instead of  
> being restricted to specific form elements.
> In Web Forms 2.0, the autofocus attribute is defined for "any form  
> control (except hidden and output controls)".  It seems like it would  
> make more sense to allow autofocus to be on any HTMLElement, and have it  
> follow the same focusable rules that focus() follows.

I thought about this a bit as well, but I'm not really sure what the use  
case would be. You typically see the effect happening for <input  
type=text>. Would this be used by contenteditable-enabled controls? Custom  

If we go down this route, I think we should add the disabled attribute as  
a global attribute as well. Internet Explorer already has it and it makes  
sense together with contenteditable and tabindex.

Anne van Kesteren

More information about the whatwg mailing list