Fieldset missing a legend

Compliance Data & User Impact

User Impact: Critical

80% Complete

Disabilities Affected:

  • blindness
  • deaf blindness
  • learning disabilities

WCAG Version:
2

WCAG Levels:

  • A

WCAG Guidelines:

Solution Techniques:

Automated Test Accuracy:
High

Check1st Severity:
2

DRRSAG Designations:

  • description

How to Fix the Problem

The first element inside the <fieldset> element must be a <legend> element which will be unique per fieldset. It provides a label or description for the group of elements that it contains. The default visual effect of the legend element can be modified in CSS by overriding its “position” property.

The Algorithm, in Simple Terms

Engine scans for <fieldset> elements missing a <legend> as first child element

Why Is it Important?

Fieldsets provide a semantic grouping for related form controls. This allows users to understand the relationship of the controls and interact with the form more quickly and effectively.

Code Example

<fieldset>
<legend>I am interested in the following (check all that apply):</legend>
<label for="id_example_photo">Photography</label><br />
<input type="checkbox" id="id_example_photo" name="interests" value="ph">
<label for="id_example_check">Photography</label><br />
<input type="checkbox" id="id_example_check" checked="checked" >
<label for="id_example_checkit">check it</label><br />
<input type="checkbox" id="id_example_checkit" checked="checked" value="ac">
</fieldset>

Additional Information

Relevant Technologies: HTML and XHTML

This element perfoms as a container, and has no functionality. This container may contain another elements that has functionality or logical role.

Ignore this issue if this element has an alternative that performs the same and overrides the content of this element.