Accy

Option group with no group label

WCAG 1.3.1, 3.3.2 (A) · EN 301 549 9.1.3.1

Related checkboxes or radio buttons are not wrapped in a <fieldset> with a <legend>.

Why it matters

With no grouping, a screen reader reads "S, M, L, XL" without ever saying the question was "Size". Every option is heard on its own, out of context.

How to fix it

Wrap the group in a <fieldset> and put the question in the <legend>. Alternatively use role="radiogroup" with an aria-label.

As it is
<p>Size</p>
<input type="radio" name="size" id="s"><label for="s">S</label>
<input type="radio" name="size" id="m"><label for="m">M</label>
As it should be
<fieldset>
  <legend>Size</legend>
  <input type="radio" name="size" id="s"><label for="s">S</label>
  <input type="radio" name="size" id="m"><label for="m">M</label>
</fieldset>

Related

Does your shop have this failure?

Check for free, along with the other 54 rules. No sign-up.

No sign-up. We scan one public page and store nothing about you.