Project

General

Profile

Actions

Bug #14921

closed

XHTML and accessibility of FORM cObj

Added by Ernesto Baschny over 19 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Category:
Frontend
Target version:
-
Start date:
2005-08-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
3.8.0
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

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).

Attached is a patch that includes ben's and my additions. Read to be included in CVS for 3.8.1 (no change in features, just adds options).

This patch also applies to 3.8.0, for the interested reader! :)

(issue imported from #M1369)


Files

FORM-ids-accessibility.patch (6.39 KB) FORM-ids-accessibility.patch Administrator Admin, 2005-08-11 18:06
bug_1369_2.patch (6.17 KB) bug_1369_2.patch Administrator Admin, 2005-11-11 17:53
bug_1369_3.patch (6.09 KB) bug_1369_3.patch Administrator Admin, 2005-11-23 19:49

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #15019: mailforms are rendered with hashed id'sClosedMichael Stucki2005-10-09

Actions
Actions

Also available in: Atom PDF