[TYPO3-core] RFC: XHTML and accessibility of FORM cObj (#1369)

Sebastian Kurfuerst sebastian at garbage-group.de
Mon Nov 14 14:19:10 CET 2005


This is a CVS patch request.

Type:
bugfix

Branches:
HEAD

Problem:
The cObj FORM currently doesn't render accessible mailforms, even if
setting "accessible=1" in its configuration.

The attached patch fixes the default template and css_styled_content.

Description (taken from http://bugs.typo3.org/view.php?id=1369 ):
The cObj FORM currently doesn't render accessible mailforms, even if
setting "accessible=1" in its conf. In a discussion in
TYPO3-content-rendering mailing list (6.6.2005), ben van't ende proposed
a patch, which can be found here:

http://typo3.org/teams/content-rendering/get-the-x-into-html/ [^]

This hasn't been incorporated into CVS yet. I found some bugs in this
implementation and added some enhancements, so we could apply it to CVS
and have it included in 3.8.1.

What ben's patch solve:

- Added: FORM conf variable: fieldPrefix where we can set a prefix to
use for all fields in this form (instead of the default "formName",
which is probably an unique-hash).
- Added: FORM conf variable: dontMd5FieldNames where we can decide not
to md5 the field names in the id fields.
- Fixed: generates one ID for each option on radio-fields, instead of
reusing the same ID (generating invalid XHTML).
- Fixed: In strict XHTML mode, set the FORM ID instead of the NAME
attribute.

My additions to ben's patch were:

- Added: In "accessibility" mode, we need to create a <fieldset> for the
radio-buttons, so we have an ID to which the LABEL refers to. Else we
end up with invalid XHTML (reference to unknown id). This is also the
most "accessible" way (the field-label refers to the whole group of
radio-buttons).
- Added: In radio-buttons, the descriptive text after the radio-button
is the LABEL for this specific button. So this will now wrap a <LABEL>
tag around the text with the correct ID (so one can click on the text
next to the radio-buttons to activate them). Only in accessibilty=1.
- Fixed: Check for ctype_digit in formname before generating the prefix,
else we might end up having a digit as the first character of the
prefix.
- Fixed: ben's patch wouldn't work with accessible=0 (generates invalid
XHTML).
- Fixed: On form elements of type "label", there is no element with an
ID, so we should not create a LABEL-tag pointing to an ID that does not
exist (generates invalid XHTML).



Greets, Sebastian

-- 
Sebastian Kurfuerst
http://garbage-group.de/kontakt.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_1243_part1.patch
Type: text/x-patch
Size: 1831 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20051114/15148d62/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_1243_part2.patch
Type: text/x-patch
Size: 96770 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20051114/15148d62/attachment-0001.bin 


More information about the TYPO3-team-core mailing list