W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2011

[whatwg] Can we make checkboxes readonly?

From: Peter Kasting <pkasting@google.com>
Date: Wed, 6 Apr 2011 14:02:37 -0700
Message-ID: <BANLkTimb5G10QL+i1F5rEuQ4=dZ86V5n3Q@mail.gmail.com>
On Wed, Apr 6, 2011 at 1:45 PM, Tab Atkins Jr. <jackalmage at gmail.com> wrote:

> Checkboxes being readonly would be useful for the same reasons that
> text inputs being readonly is.
>

As someone who spends a lot of time writing native UIs, I agree.  It's
useful to be able to "dim out" a checkbox that no longer applies when some
other, related form control is changed.

We
> could alternately say that a radio button being readonly means that
> that specific input can't have its checkedness changed - if it's
> currently unchecked, clicking on it won't check it; if it's currently
> checked, clicking on a mutable radio button from the same group
> wouldn't change the checkedness of either input.
>

Enabling individual radio buttons within a group to be disabled would match
Windows' capabilities, at least.  It's not clear whether the right behavior
might not be to allow clicks on an enabled button to unselect the disabled
button, though.  See for example someone wanting that with a Windows native
control here:
http://social.msdn.microsoft.com/Forums/en-IE/vcmfcatl/thread/75fef4b4-a7ab-4e96-ac9b-12cb27085ab9

PK

PK
Received on Wednesday, 6 April 2011 14:02:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:03 GMT