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

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  
controls?

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
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Monday, 16 June 2008 12:26:37 UTC