ember-template-lint icon indicating copy to clipboard operation
ember-template-lint copied to clipboard

`require-input-label` fails when label is a sibling element

Open mckennagalvin opened this issue 4 years ago • 1 comments

require-input-label seems to throw errors for elements whose labels are defined outside of the input element. e.g. the following code doesn't pass and gives an error for form elements require a valid associated label, even though it is valid markup for a11y:

<label for="foo">this is a label</label>
<textarea id="foo"/>

mckennagalvin avatar Feb 18 '21 00:02 mckennagalvin

I wasn't able to replicate this issue, but I think that this rule should support the textarea element anyway, so I submitted a PR that will cover it. 👍

MelSumner avatar Feb 18 '21 17:02 MelSumner