- From: Mounir Lamouri <mounir.lamouri@gmail.com>
- Date: Wed, 01 Dec 2010 01:53:39 +0100
On 11/29/2010 04:15 PM, Anne van Kesteren wrote: > 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. Yes, you can found them in the patch attached to this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=610687 -- Mounir
Received on Tuesday, 30 November 2010 16:53:39 UTC