-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inputs missing labels & Labels missing inputs #7
Comments
I like this. But what about this scenario, which I often do: <label>
<span>Email</span>
<input type="email" />
</label> I think the above solution would highlight this as an error? 🤔 I have to admit, my knowledge and research on this method in terms of accessibility where the |
It would, but I think as someone suggested to us on twitter, this approach is flawed as some screen readers don't correctly associate the inner input with the wrapping label. So maybe in this case we would show a warning?
|
Ok, that sounds good. I think we should look deeper into #4 first so this works effectively. |
Hey @danspratling and @jackdomleo7 , I would like to resolve this issue. Please assign it to me. |
I am so sorry for tagging this. It was a mistake #73 does not address this in any way |
I merged #43 into branch valid_input_and_label and did a little more work. It was throwing a false error for: <label>
Label
<input />
</label> And I don't think Either needs a lot more thought or accept we can't do it with CSS. |
⚠ For anyone interested in re-picking this up, please refer to the |
Proposal:
Inputs missing labels (often when Placeholders are being used as labels) might have unclear intentions.
Issue:
The placeholder in the above example is rarely read by screenreaders
Issue 2:
The label in the above example exists, but is not associated with an element so will often be misinterpreted.
Solution:
The above is the best-accepted solution, which most screen readers understand (unlike
<label><input></label>
).We should check 2 things
This won't account for if any inputs/labels have attributes present but their counterparts don't exist, however.
The text was updated successfully, but these errors were encountered: