W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2006

[whatwg] [wf2] Omission of legend

From: Henri Sivonen <hsivonen@iki.fi>
Date: Sat, 1 Apr 2006 15:51:14 +0300
Message-ID: <BD54E3F3-D0D3-4159-9C97-46001FB88403@iki.fi>
I hit this issue at:
http://webforms2.testsuite.org/controls/common-attributes/disabled/ 
003.htm

The spec says:
"Specifically, the form, legend, select, and optgroup elements may  
now be empty. - - In HTML4, those elements always required at least  
one element child, or, in the case of legend, at least one character  
of text."

The position of HTML 4.01 was pretty clearly that <legend> is  
required as the first child (ignoring whitespace) of <fieldset>.  
However, SGML DTDs are not expressive enough to enforce the part of  
forbidding non-whitespace character data before <legend>.

XML DTDs are even less expressive, so the XHTML 1.0 Strict DTD  
neither enforces the presence of <legend> nor its position as the  
first child.

Since the omission of <legend> does not cause any horrible effects, I  
suggest making <legend> optional and reaffirming that if it appears,  
it can appear only once per <fieldset> and only as the first child  
(ignoring whitespace).

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/
Received on Saturday, 1 April 2006 04:51:14 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:46 UTC