Given the following markup:
<fieldset id="comp-1">
<legend id="comp-1[label]">Legend One</legend>
<label for="dd-1" id="dd-1[label]">Day</label>
<input id="dd-1" type="text" />
</fieldset>
<fieldset id="comp-2">
<legend id="comp-2[label]">Legend Two</legend>
<label for="dd-2" id="dd-2[label]">Day</label>
<input id="dd-2" type="text" />
</fieldset>
Both instances throw the following error:
Error / priority 100% This field label is not unique.
Web Content Accessibility Guidelines (WCAG) 2.0, Level AA: 2.4.6 Headings and Labels
These field labels have identical text. Make sure that fields have unique labels. If you have a legitimate reason to reuse the label text, make sure that the different fields are grouped appropriately using a
<fieldset>
.
Should this still be flagged as an error
when the actual guidance is already being followed (grouping by fieldset)?