[whatwg] Can we make checkboxes readonly?

Tab Atkins Jr. jackalmage at gmail.com
Wed Apr 6 13:45:36 PDT 2011


Currently, the spec disallows checkboxes from being made readonly.  Is
there some good reason for this?  If not, can we change it?
Checkboxes being readonly would be useful for the same reasons that
text inputs being readonly is.

Radio buttons can't be readonly either, but they have the obvious
complication of being multiple elements.  We could define behavior for
them, of course.  One option is to take the @required route, and say
that if one radio button in a group is readonly, they all are.  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.

~TJ


More information about the whatwg mailing list