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

I saw the need for this in our Web Inspector, which has a lot of  
custom controls (including some that use contenteditable elements).   
Some of these don't have a default focused appearance, but its nice  
that they can follow the focus pseudo-class CSS selector.

I agree that the disabled attribute would fit in well with this.   
Again, it would be nice for these custom controls to be able to use  
the disabled pseudo-class CSS selector.

- Adele

On Jun 16, 2008, at 12:26 PM, Anne van Kesteren wrote:

> 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 13:09:24 UTC