wet-boew-styleguide icon indicating copy to clipboard operation
wet-boew-styleguide copied to clipboard

Checkbox and radio buttons

Open Mercier opened this issue 10 years ago • 1 comments

On this page http://wet-boew.github.io/wet-boew-styleguide/v4/design/forms-en.html#checkboxes the label tag is missing the for attribute. Although how you have done it is called "associating labels implicitly" and is explained in this Labeling Controls tutorial from W3(http://www.w3.org/WAI/tutorials/forms/labels/), WCAG 2.0 accessibility tools fail our page when we use that code. And it seems many forums, blogs, and online article recommend not using the implicit method. If you go to H44: Using label elements to associate text labels with form controls (http://www.w3.org/TR/WCAG20-TECHS/H44.html), in the Tests section, if an input element of type checkbox or radio has a label element, it needs a for attribute or else it fails. Is there another technique that you are using to ensure WCAG conformance for using implicit labelling for checkboxes and radio buttons? I see you are using the for attribute for all the other label examples on the Forms pages. Thank you.

Mercier avatar Sep 30 '15 18:09 Mercier

Fixed with #372

ghost avatar Apr 12 '19 19:04 ghost