[whatwg] LABEL and radio/checkbox onclick

On Sat, 28 Aug 2004, Matthew Thomas wrote:
>
> [when you hit enter in a form, it should submit it with no button being 
> successful, instead of the first button being successful.]

I've thought about this some more, and I really don't like the IE way.

In traditional GUI UIs if you hit enter, what happens is that there is a 
default button which gets invoked. To the application, it's just like 
hitting that button.

By saying that that is what happens on the Web too, we can have an actual 
default button, and style it so that it's indicated, like in dialogs. The 
:default pseudo-class can even match that element.

There are various problems with doing this, but they're not serious:

- longer URIs: don't give your button a name, if you don't want to have 
  that button in the URI.

- not what IE does: Since Mozilla, Opera and Safari all do it, it's 
  apparently not a compatibility problem on the Web. Authors can easily
  just assume the first button anyway, so implementing it takes no extra 
  code.

I think the benefits -- consistency with GUIs, consistent model, and the 
possibility to build from this later (e.g. changing the default button) -- 
outweigh these problems.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 8 November 2004 15:56:20 UTC