Labels wrapping their form element are incorrectly highlighted as errors
Closed this issue · 1 comments
AshleyJSheridan commented
A label which wraps a form element is perfectly valid and accessible, but is being highlighted as an error by a11y.css.
The following code should be considered valid:
<label>
Name <input type="text name="name"/>
</label>
Currently, only form elements linked to their label by id or elements that use aria-label
or aria-labelledby
are considered valid.
ffoodd commented
In fact, it's only a warning — so it's meant to be double-checked, not considered as an error.
And the implicit labelling is even mentionned as valid in the test's documentation.
Thanks for submitting an issue