Skip to content

AVT- Form controls must have associated labels

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

Form controls must have associated labels. An HTML LABEL specifically associates the label's text with the form control. This allows the browser to tell the user definitively which label applies to the given control.

Steps to reproduce

  1. GitLab->Project->Issues-> Board
  2. GitLab->Merge Requests-> New
  3. GitLab->CI/CD-> Schedules -> New

What is the expected correct behavior?

Each FORM control must have an associated label. An explicit LABEL is attached to a specific form control through the use of the "for" attribute with a value that matches the value of an existing valid "id" attribute.

Possible fixes

Add 'label' tag to wrap the input and the value of 'for' should equals with the value of 'id' as below example 'search'.

For example:

  <FORM action="http://somesite.com/foo" method="get">
        <LABEL for="search">Name:</LABEL>
        <INPUT type="text" id="search" SIZE="50">
        .....

Relevant screenshots

@sharonchen @carmacleod

Edited by 🤖 GitLab Bot 🤖