wet-boew / wet-boew-styleguide

A style guide for the Web Experience Toolkit.
http://wet-boew.github.io/wet-boew-styleguide/index-en.html
36 stars 32 forks source link

Checkbox and radio buttons #258

Open Mercier opened 8 years ago

Mercier commented 8 years ago

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.

ghost commented 5 years ago

Fixed with #372