Fieldset label (group-label)
Group related form fields with
<fieldset> and include a descriptive
<legend> for each group.
Missing fieldset and legend:
These related inputs do not have
<fieldset> and
<legend> elements:
The (DOM/programmatic) structure of the form above looks like this:
<p>What is your favorite fruit?</p>
<input type="radio" id="apple" name="fruit" value="apple" />
<label for="apple">Apple</label>
<br/>
<input type="radio" id="banana" name="fruit"
value="banana"/>
<label for="banana">Banana</label>
<br/>
<input type="radio" id="cherry" name="fruit"
value="cherry"/>
<label for="cherry">Cherry</label>
<br/>
<br />
<label for="submit">
Submit:
</label>
<input type="submit" id="submit" name="submit"
value="Submit"/>
Note: Impossible to automatically test or detect. Requires a human tester
or AI to determine if a
<fieldset> element is needed and where
(i.e. which form elements are related), and ensure that a
<fieldset>
exists if necessary.