Proposal:
Inputs missing labels (often when Placeholders are being used as labels) might have unclear intentions.
Issue:
<input type="text" placeholder="Email" />
The placeholder in the above example is rarely read by screenreaders
Issue 2:
<label>Email</label>
<input type="text" />
The label in the above example exists, but is not associated with an element so will often be misinterpreted.
Solution:
<label for="email">Email Address</label>
<input name="email" type="text" />
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.
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.