[TYPO3-content-rendering] Fieldset around radio-button group

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Tue Apr 4 13:42:15 CEST 2006


Ernesto Baschny [cron IT] schrieb:
> Hi,
> 
> in TYPO3 4.0 we are shipping an accessible version for MAILFORM content
> elements. This includes "label for" tags and "fieldset" around the whole
> form and around radio-button groups.
> 
> A bug report was opened on that issue:
> 
>   http://bugs.typo3.org/view.php?id=2485
> 
> Appart from the "bug" of doubled fieldset (fixed), the reporter Marc is
> arguing that "nested fieldsets" are "absolute counterproductive". I
> don't agree with that (see my last note on that bug report).
> 
> The issue is the rendering of radio-button groups. Currently (with the
> fix applied and "accessibile = 1") those are rendered like this:
> 
>   <div class="csc-mailform-field">
>     <label for="mailformfradio">Radio:</label>
> 
>     <fieldset id="mailformfradio">
>       <legend>Radio:</legend>
>         <input type="radio" name="fradio" id="mailformfradioRadio1"
> value="Radio 1" class="csc-mailform-radio" /><label
> for="mailformfradioRadio1">Radio 1</label><br />
>         <input type="radio" name="fradio" id="mailformfradioRadio2"
> value="Radio 2" class="csc-mailform-radio" /><label
> for="mailformfradioRadio2">Radio 2</label><br />
>     </fieldset>
>   </div>
> 
> The problem is that we have the label "Radio:" twice in the code, one
> before the button-fieldset, and the other as the legend of the fieldset.
>  What are your comments on that?
> 
> My idea would be:
> 
>   <div class="csc-mailform-field">
>     <fieldset class="csc-mailform-radiogroup">
>       <legend>Radio:</legend>
>         <input type="radio" name="fradio" id="mailformfradioRadio1"
> value="Radio 1" class="csc-mailform-radio" /><label
> for="mailformfradioRadio1">Radio 1</label><br />
>         <input type="radio" name="fradio" id="mailformfradioRadio2"
> value="Radio 2" class="csc-mailform-radio" /><label
> for="mailformfradioRadio2">Radio 2</label><br />
>     </fieldset>
>   </div>
> 
> (no label before the fieldset and no "id" for the fieldset).
> 
> The only issue here is optical: you won't have a "label" to the right of
> the radio-button-group (if you resemble the table-layout with CSS).

Really dependes on the layout. Dropping the label may break the design.

Why not drop the legend? If I have a label then we don't need the legend 
for accessibility.

Make it yet another option? Provide a way to change the fieldset (or the 
label) to avoid the duplication which IMHO is not only an optical but also 
a semantical problem.

Masi



More information about the TYPO3-project-content-rendering mailing list