WebAIM - Web Accessibility In Mind

E-mail List Archives

RE: Long form legends

for

From: Steven Faulkner
Date: Jun 10, 2005 2:10PM



Jukka "Yucca" Korpela wrote:

>Contrary to what the
> cited document
> claims, the <legend> element is _not_ optional. It is required by HTML
> syntax, see
> http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.10
> (Even the spec is misleading: it says that "The LEGEND element allows
> authors to assign a caption to a FIELDSET", but by the formal syntax,
> <legend> is required.)

Does this mean that the W3C validator is incorrect when it says a xhtml
1.0 transitional document containing a fieldset element without a legend
element is valid?

with regards

Steven Faulkner
Web Accessibility Consultant
National Information & Library Service (NILS)
454 Glenferrie Road
Kooyong Victoria 3144
Phone: (613) 9864 9281
Fax: (613) 9864 9210
Email: <EMAIL REMOVED>

National Information Library Service
A subsidiary of RBS.RVIB.VAF Ltd.




> -----Original Message-----
> From: <EMAIL REMOVED>
> [mailto: <EMAIL REMOVED> ]On Behalf Of Jukka K.
> Korpela
> Sent: Sunday, 5 June 2005 1:59 AM
> To: WebAIM Discussion List
> Subject: Re: [WebAIM] RE: Long form legends
>
>
> On Sat, 4 Jun 2005, Richard Garbutt wrote:
>
> > This tutorial:
> >
> > http://www.picment.com/articles/css/funwithforms/
> >
> > seems great on styling forms. I like the way they mark them up:
> >
> > <code>
> > <form>
> > <fieldest>
> > <label for="foo">foo</label>
> > <input id="foo" type="text" name="foo" />
> > </fieldset>
> > </form>
> > </code>
>
> Unfortunately, that's invalid markup, and I don't mean just the
> misspelling <fieldest> for <fieldset>. Contrary to what the
> cited document
> claims, the <legend> element is _not_ optional. It is required by HTML
> syntax, see
> http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.10
> (Even the spec is misleading: it says that "The LEGEND element allows
> authors to assign a caption to a FIELDSET", but by the formal syntax,
> <legend> is required.)
>
> I don't think <fieldset> is particularly useful for a
> _single_ field. It's
> useful for a _group_ of interrelated radio buttons and their
> captions, for
> example.
>
> Note: <legend></legend> would satisfy the syntax requirement,
> but it may
> confuse people who use browsers that speak the legend.
>
> --
> Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
>
>
>
>


__________________________________________________________________
<< ella for Spam Control >> has removed Spam messages and set aside Later
for me
You can use it too - and it's FREE! http://www.ellaforspam.com