Re: [whatwg] comment on autofocus attribute from Web Forms 2.0 spec
On Fri, 28 Nov 2008, Anne van Kesteren wrote: On Sat, 08 Nov 2008 18:46:48 +0100, Ian Hickson [EMAIL PROTECTED] wrote: On Mon, 16 Jun 2008, Adele Peterson wrote: 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. I really would rather see XBL2's div element be extended to be focusable and disablable rather than have HTML support this. Does that make sense? How would you disable td contenteditable or div contenteditable with that strategy and have td:disabled and div:disabled (or something very close to it) work? It would require something similar to what I had in mind for the very neglected Web Controls 1.0 draft, i.e. an API that sets when an element is disabled or editable or whatever, that all the other attributes and form controls are defined in terms of. (This would also have been a better way of doing what ARIA does.) -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Re: [whatwg] comment on autofocus attribute from Web Forms 2.0 spec
On Sat, 08 Nov 2008 18:46:48 +0100, Ian Hickson [EMAIL PROTECTED] wrote: On Mon, 16 Jun 2008, Adele Peterson wrote: 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. I really would rather see XBL2's div element be extended to be focusable and disablable rather than have HTML support this. Does that make sense? How would you disable td contenteditable or div contenteditable with that strategy and have td:disabled and div:disabled (or something very close to it) work? -- Anne van Kesteren http://annevankesteren.nl/ http://www.opera.com/
Re: [whatwg] comment on autofocus attribute from Web Forms 2.0 spec
On Mon, 16 Jun 2008, Adele Peterson 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. While I think this would make sense from a consistency point of view, I don't think we want to encourage people to autofocus elements that are not built-in controls. The .focus() method is there because otherwise there's no way to focus the elements, but autofocus is just a convenience. -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Re: [whatwg] comment on autofocus attribute from Web Forms 2.0 spec
On Mon, 16 Jun 2008, Adele Peterson wrote: 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. I really would rather see XBL2's div element be extended to be focusable and disablable rather than have HTML support this. Does that make sense? -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
[whatwg] comment on autofocus attribute from Web Forms 2.0 spec
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. Thanks, Adele
Re: [whatwg] comment on autofocus attribute from Web Forms 2.0 spec
On Mon, 16 Jun 2008 21:17:18 +0200, Adele Peterson [EMAIL PROTECTED] 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/
Re: [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 [EMAIL PROTECTED] 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/