-
Bug
-
Resolution: Fixed
-
Minor
-
2.5
-
MOODLE_25_STABLE
-
MOODLE_25_STABLE, MOODLE_26_STABLE
-
MDL-42505-Feedback-Inappropriate-use-of-fieldset-tags-around-cancel-button -
A. Inappropriate usage of fieldset tags
Affects: Whole form and Cancel button
Issue: When displaying a feedback form (both preview and complete view), the whole form as well as the Cancel button are wrapped in a fieldset tag. While all the fields in a form are related in that it one whole form, the intent of the fieldset tag is to group sets of related fields. For example, the a set of radio buttons or checkboxes, or the input fields which make up an address.
The current implementation results in failure of WCAG 2.0 Criterion 1.3.1 (1:Perceivable, 3:Adaptable, 1:Info and Relationships) as tested using the following technique: H71: Failure of Success Criterion 1.3.1 due to using structural markup in a way that does not represent relationships in the content. For more information, see http://www.w3.org/TR/WCAG20-TECHS/H71.html#H71-tests.
Recommendation: Remove the <fieldset>/</fieldset> tags around the form and Cancel button.
Files that would need to be modified:
- /mod/feedback/complete.php
- /mod/feedback/complete_guest.php
B. Missing fieldset tags
Affected question types:
- Multiple choice, multiple answers (checkboxes)
- Multiple choice (rated), multiple answers (checkboxes)
- Multiple choice, single answer allowed (Radio Buttons)
- Multiple choice (rated), single answer allowed (Radio Buttons)
Issue: Related groups of controls are not grouped in a fieldset tags
The current implementation results in failure of WCAG 2.0 Criterion 1.3.1 (1:Perceivable, 3:Adaptable, 1:Info and Relationships) as tested using the following technique: H71: Providing a description for groups of form controls using fieldset and legend elements. For more information, see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/H71#H71-tests.
Recommendation: Wrap groups of related radio buttons and groups of related fieldset controls in fieldset tags.
Files that would need to be modified:
- /mod/feedback/item.multichoce/lib.php
- /mod/feedback/item.multichocerated/lib.php
C. Inappropriate use of unordered list
The following files would need to be modified:
- Multiple choice, single answer allowed (dropdownlist)
- Multiple choice (rated), single answer allowed (dropdownlist)
Issue: When displaying a dropdown list in a form, each set of label/dropdown list control are wrapped in a single item unordered list. This is inappropriate use of unordered lists because you will never have multiple dropdown lists in a single question.
This implementation results in failure of WCAG 2.0 Criterion 1.3.1 (1:Perceivable, 3:Adaptable, 1:Info and Relationships) as tested using the following technique: F43: Failure of Success Criterion 1.3.1 due to using structural markup in a way that does not represent relationships in the content. For more information, see Failure Technique #4 at http://www.w3.org/TR/WCAG-TECHS/F43.html#F43-tests.
Recommendation: Remove the <ul> tags and replace the <li> tags with div tags so as to maintain the developers ability to apply CSS styles.
Files that would need to be modified:
- /mod/feedback/item.multichoce/lib.php
- /mod/feedback/item.multichocerated/lib.php
D. Duplicate hidden label field
Affected questions types:
- Multiple choice, single answer allowed (dropdownlist)
- Multiple choice (rated), single answer allowed (dropdownlist)
Issue: There is a hidden label for dropdown lists. This is an issue for users who turn off styles and may affect users of screen readers.
This implementation results in failure of WCAG 2.0 Criterion 1.3.1 (1:Perceivable, 3:Adaptable, 1:Info and Relationships) as tested using the following technique: F43: Failure of Success Criterion 1.3.1 due to using structural markup in a way that does not represent relationships in the content. For more information, see Failure Technique #4 at http://www.w3.org/TR/WCAG-TECHS/F43.html#F43-tests.
Recommendation: Remove the hidden copy of the label as it doesn't appear to serve any purpose.
Files that would need to be modified:
- /mod/feedback/item.multichoce/lib.php
- /mod/feedback/item.multichocerated/lib.php