This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20585 - Make fieldset invalid if it contains an invalid form control
Summary: Make fieldset invalid if it contains an invalid form control
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-07 12:55 UTC by Mounir Lamouri
Modified: 2013-04-15 12:01 UTC (History)
3 users (show)

See Also:


Attachments

Description Mounir Lamouri 2013-01-07 12:55:12 UTC
Originally requested in https://bugzilla.mozilla.org/show_bug.cgi?id=596515 and forked to https://bugzilla.mozilla.org/show_bug.cgi?id=717181.

It would be great for authors to know when a fieldset contains an invalid element. It would allow more high level messages. For example, a fieldset containing all fields required for an address could have a UI poping up saying "The address is invalid" if an element inside the fieldset happens to be invalid.
Comment 1 Mounir Lamouri 2013-01-07 12:58:19 UTC
Note that we could simply make :invalid pseudo-class matches like we are currently doing for forms.
Comment 2 Ian 'Hixie' Hickson 2013-03-06 22:53:18 UTC
Do you just want me to add the following to the definition of ":invalid"?:

   fieldset elements that have of one or more descendant elements that
   themselves are candidates for constraint validation but do not
   satisfy their constraints

(Is it too late to make :invalid match <fieldset>?)
Comment 3 Mounir Lamouri 2013-03-07 09:32:45 UTC
(In reply to comment #2)
> Do you just want me to add the following to the definition of ":invalid"?:
> 
>    fieldset elements that have of one or more descendant elements that
>    themselves are candidates for constraint validation but do not
>    satisfy their constraints
> 
> (Is it too late to make :invalid match <fieldset>?)

I would be willing to have that implemented in Gecko.
Comment 4 Ian 'Hixie' Hickson 2013-04-12 23:02:36 UTC
Ok, let's try that then.
Comment 5 contributor 2013-04-12 23:04:03 UTC
Checked in as WHATWG revision r7823.
Check-in comment: Make :invalid match <fieldset>s that contain invalid controls.
http://html5.org/tools/web-apps-tracker?from=7822&to=7823