[whatwg] Add <input> "Switch" Type

Jukka K. Korpela jkorpela at cs.tut.fi
Tue Nov 19 13:28:42 PST 2013

2013-11-19 22:27, Qebui Nehebkau wrote:

> A checkbox represents an input with
> binary state. As I understand it, whether the input is immediate or
> takes effect only on some kind of submission is defined by context -
> specifically, whether the checkbox is associated with a form with a
> submit button.

This more or less summarizes the alternative look at the issue that I 
mentioned. But I’m still inclined into thinking that distinguishing 
between checkboxes and switches, or giving authors the possibility of 
making the distinction at the level of control elements, is a useful 
thing to do. It’s not too late to introduce it. Most pages still use 
checkboxes just as selections, selecting options for some action to be 
requested shortly. (The <select> element may be a lost cause: as a user, 
you can’t know whether a dropdown just sets an option or actually “runs” 

> In contrast, a button represents a single action, atomic from the
> user's point of view. Pressing the button again should (it seems to
> me) logically perform the same action again;

It would be too restrictive to require that, and an reality, things 
don’t work that way. For example, if the action consists of deleting 
something, you just can’t repeat it next.


More information about the whatwg mailing list