[whatwg] Can we make checkboxes readonly?

Peter Kasting pkasting at google.com
Wed Apr 6 14:02:37 PDT 2011

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.

> 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:



More information about the whatwg mailing list