W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2010

[whatwg] Make radio button group suffering from being missing

From: Anne van Kesteren <annevk@opera.com>
Date: Mon, 29 Nov 2010 16:15:03 +0100
Message-ID: <op.vmxtzdh364w2qv@g223.guest-int.opera.com>
On Thu, 04 Nov 2010 01:20:37 +0100, Mounir Lamouri  
<mounir.lamouri at gmail.com> wrote:
> Currently, when a radio button is required, it will suffer from being
> missing if no radio elements in the radio button group is checked.
> However, radio elements in the group will not suffer from being missing
> if they do not have the required attribute. In other words, if you try
> to style invalid elements with :invalid, and do:
> <input type='radio' name='s' value='M' required>
> <input type='radio' name='s' value='F'>
> only the first element will be styled.
>
> I think we should move the requirement to the radio button group that
> way: "The radio button group suffers from being missing if one of the
> input elements in the radio button group is required and all of them
> have a checkedness that is false." and radio elements would have this
> constraint: "If the radio button group is suffering from being missing,
> the element is suffering from being missing.".
>
> That way, all radio elements in the same radio button group will have
> the same validity state. That would be less annoying for authors and
> error proof while making things clearer (IMO).
>
> I'm thinking of implementing that for Gecko 2.0/Firefox 4 so I would
> like to know if you know any reason that would make the current behavior
> more appropriate than the one described here.

Do you have tests for this by any chance? I agree it makes sense to always  
treat them as a group.


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Monday, 29 November 2010 07:15:03 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:28 UTC