On 12/28/05, Jonathan Carter <[EMAIL PROTECTED]> wrote: > I have recently been re-evaluating my thinking on the subject of > designing semantic forms and the use of fieldsets has raised a few > questions for me. What I'd like to know is: at what point does it become > semantically correct to include a fieldset? (Presentational effects > aside) My first thought is that any time you have two or more related > fields, a fieldset could be effectively used to group them together so > that the browser knows what goes with what, therefore making it more > accessible for future cases. If this assumption is true, does that mean > a fieldset element should ALWAYS be used anytime two or more form fields > exist in association? That seems slightly overkill, but if it's semantic > benefits are as aforementioned, then the extra work would be merited and > certainly not in vain. > > This leads into my next question: should a legend always be included > inside a fieldset, even if it's not going to be displayed
While reading the specs is often problematic for answering questions, in this case it seems fairly straightforward: "The FIELDSET element allows authors to group thematically related controls and labels. Grouping controls makes it easier for users to understand their purpose while simultaneously facilitating tabbing navigation for visual user agents and speech navigation for speech-oriented user agents. The proper use of this element makes documents more accessible."[1] As for legend: "The LEGEND element allows authors to assign a caption to a FIELDSET. The legend improves accessibility when the FIELDSET is rendered non-visually."[1] The example shows legend within the appropriate fieldset (which makes intuitive sense). So put it inside the fieldset it describes. The language used in this section describes fieldset and legend as options which improve usability and accessibility. Along with label; fieldset and legend help to make the overall purpose of the form and the themes of its sections clear(er). That is to say, if you think it will help make the form clear, do it; otherwise you can skip it. All leading me to the conclusion that it is probably better to do it than not; while also avoiding making it into a fetish. [1]http://www.w3.org/TR/html4/interact/forms.html#edef-FIELDSET drew ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************
