[TYPO3-content-rendering] Fieldset around radio-button group
Ernesto Baschny [cron IT]
ernst at cron-it.de
Tue Apr 4 10:52:56 CEST 2006
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).
Cheers,
Ernesto
More information about the TYPO3-project-content-rendering
mailing list