false negative "Form elements do not have associated labels"
See original GitHub issueI have custom input type number in my form, I also use eslint-plugin-a11y. This is my html, which gives false negative on #date-year input/label pairs in lighthouse
<label class="_1DlQ3 _3R713" for="date-year">
Year
<div class="_1T1WW _21GYC">
<button aria-label="minus" class="_37Bh1">
<div class="_3CR_3 _3REq5 M9WNo">
<svg viewBox="0 0 16 16">
<path fill="currentColor" d="M0,7c16,0,16,0,16,0l0,0v2H0"></path>
</svg>
</div>
</button>
<input type="number" aria-live="polite" aria-atomic="true" id="date-year" class="_2I5TO _3bdCp _3waAi _3rENR" value="2018" min="2017" max="2020" step="1">
<button aria-label="plus" class="_3qHF4">
<div class="_3CR_3 _3REq5 M9WNo">
<svg viewBox="0 0 16 16">
<path fill="currentColor" d="M16,7c0,0-0.007,0-7,0V0H7v7C5.096,7,2.797,7,0,7v2h7v7h2V9h7V7z"></path>
</svg>
</div>
</button>
</div>
</label>
This is the link, you can see there is custom date-picker with 5 elements of this kind of inputs. https://www.taximow.com/en/transfer/train-from/
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
"Form elements do not have associated labels" (but they ...
I think lighthouse is complaining because your label tag doesn't have any content, it is missing the actual label text. Adjusting the markup...
Read more >Form elements do not have associated labels
The fields do not have labels because you leave empty the “Field Label” attributes in the fields' settings. The preferred solution would be...
Read more >Accessibility rule: Form elements should have a visible label
The labels provided by the title and aria-describedby attributes are insufficient to create a real label that can be inferred programmatically from the...
Read more >Using label elements to associate text labels with form ...
The objective of this technique is to use the label element to explicitly associate a form control with a label. A label is...
Read more ><input>: The Input (Form Input) element - HTML
A Boolean attribute which, if present, indicates that the user should not be able to interact with the input. Disabled inputs are typically ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@JustFly1984 Try wrapping the LABEL tag around the INPUT tag, or replacing LABEL with a FIELDSET and embedded LEGEND tag. There may be a conflict in wrapping a label around BUTTON and INPUT tags --a browser may have focus issues. I had a similar issue that was resolved when I substituted FIELDSET/LEGEND in place of LABEL.
That is really weird, cos I host my website on netlify.com CDN, which in turn based on AWS. I already had complains about access to my website from Luxembourg ISP which is also weird. Can you please describe your location? I need to investigate, why does my website is unaccessible in some countries.
BTW Paul, I love your youtube videos, Thank you a lot! PS. Can you try to visit my website from VPN or something?
2018-04-20 13:09 GMT+08:00 Paul Irish notifications@github.com: