HTML_CodeSniffer
HTML_CodeSniffer copied to clipboard
Principle1.Guideline1_3.1_3_1.F68 missing on Success Criteria page
The following error isn't listed on the WCAG 2.0 Success Criteria overview page: http://squizlabs.github.io/HTML_CodeSniffer/Standards/WCAG2/
WCAG2AAA.Principle1.Guideline1_3.1_3_1.F68
This form field should be labelled in some way. Use the label element (either with a "for" attribute or wrapped around the form field), or "title", "aria-label" or "aria-labelledby" attributes as appropriate.
Hi Danny,
The documentation regarding the generated messages unfortunately been lagging really rather behind the actual code (it's not auto-generated and I was looking for any potential re-write to focus on "what it tests" rather than "what messages it gives", so it's fallen behind a little further).
In this case, HTMLCS used to simply look for an explicit "for" attribute as per the WCAG2 techniques documents of the time, and these were reported as various violations of technique H44 (or possibly H65 re: "title" elements). In 2014 the techniques document had a major update that also included the ARIA methods of labelling an element.
Since a failure "technique" is a stronger pass/fail criterion than not using techniques (WCAG2 itself declares the listed techniques are not exhaustive), and to avoid having to list six or seven different techniques, this was changed (in HTMLCS 2.0.3 or 2.0.4 from memory) to be listed as a failure of F68.
As a further note, potentially to fellow developers (I'm not the only one working on this anymore) - in the February 2015 update to the techniques note, this F68 failure no longer refers to SC 1.3.1, and should be moved to SC 4.1.2 - but it's still a Level A failure.