Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-38316

Provide a valid label for form fields

    XMLWordPrintable

    Details

    • Previous Issue Keys:
      A11YTEST-342

      Description

      [Note]Not able to recreate since there is no checkbox found on new environment link.However, there is empty

      <th> for these checkboxes.<th id="checkbox" class="screenOnly attach" scope="col"><input id="selunselallid" title="Select all selectable" name="selunselall" style="display: none;" type="checkbox"></th><td class="screenOnly attach" headers="checkbox"> </td>If there will be checkboxes in production then please review following notes.The "Membership" page of the environment provides a table with several checkboxes that allow the user to make selections and then activate either the "Unjoin" or "Clear Selections" buttons at the bottom of the page.  However, these checkboxes currently rely solely on the <title> attribute to provide their name, and do not utilize the <label> attribute.  As such, screen reader users may have difficulty discerning the purpose of the checkboxes.<th id="checkbox" class="screenOnly attach"><input id="selunselallid" type="checkbox" name="selunselall" title="Select all selectable"></th>

      Developers must always provide valid labels for form fields in order to ensure that screen reader users will be able to discern the purpose of the form field. In this case, the HTML

      <label> attribute must be implemented with the "for" value matching the "id" of the input field.  This <label> element can be positioned off-screen with CSS as long as it is not assigned the display:none property.  The following code is provided as an example:<th id="checkbox" class="screenOnly attach"><label for="selunselallid">Select all Selectable</label><input id="selunselallid" type="checkbox" name="selunselall" title="Select all selectable"></th>

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                Unassigned Unassigned
                Reporter:
                jonespm Matthew Jones
                Votes:
                1 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:

                    Git Integration