[whatwg] Can we make checkboxes readonly?

Jonas Sicking jonas at sicking.cc
Wed Apr 6 15:42:10 PDT 2011


On Wed, Apr 6, 2011 at 3:28 PM, Tab Atkins Jr. <jackalmage at gmail.com> wrote:
> On Wed, Apr 6, 2011 at 3:12 PM, Lachlan Hunt <lachlan.hunt at lachy.id.au> wrote:
>> On 2011-04-06 22:45, Tab Atkins Jr. wrote:
>>>
>>> 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.
>>
>> What's wrong with using disabled?
>>
>> <input type="checkbox" disabled>
>> <input type="checkbox" disabled checked>
>
> Disabled elements don't participate in form submission.

Also, consistency across input types seems like a good thing for authors.

/ Jonas



More information about the whatwg mailing list