You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In HTML (http://www.w3.org/html/wg/drafts/html/CR/forms.html#the-label-element), the relationship between a label and its labelled control can also be determined by containment rather than by using a for attribute. The two techniques are equivalent ways of establishing the same relationship in serialised HTML, and once the DOM is parsed, the two techniques are indistinguishable.
The containment technique is a useful one, as it removes the need to generate large amounts of unnecessary ids, and manage their uniqueness. Obviously, it would be better if using this technique didn't result in false positives.
The text was updated successfully, but these errors were encountered:
In the WCAG 2.0 techniques document, the method of implicitly associating labels with a form element by wrapping the LABEL element around the element was actually considered a failure, but this was changed in the March 2014 edition.
I'm going to close this off as I'm going to merge it with #107, which is going to be the "master rewrite" issue for the "labels on inputs". There were other things to do with aria-labels that I have to include in there too.
The code sniffer reports an error if a "label" element does not have a "for" attribute. The relevant guideline (http://www.w3.org/TR/2008/REC-WCAG20-20081211/#content-structure-separation-programmatic) requires only that the relationship be programatically determined.
In HTML (http://www.w3.org/html/wg/drafts/html/CR/forms.html#the-label-element), the relationship between a label and its labelled control can also be determined by containment rather than by using a for attribute. The two techniques are equivalent ways of establishing the same relationship in serialised HTML, and once the DOM is parsed, the two techniques are indistinguishable.
The containment technique is a useful one, as it removes the need to generate large amounts of unnecessary ids, and manage their uniqueness. Obviously, it would be better if using this technique didn't result in false positives.
The text was updated successfully, but these errors were encountered: