Basic HTML and HTML5, input elements - incomplete description of the "for" attribute
See original GitHub issueChallenge Name
Basic HTML and HTML5: Create a Text Field Basic HTML and HTML5: Create a Set of Radio Buttons Basic HTML and HTML5: Create a Set of Checkboxes
Issue Description
This is a follow up to issue #15946 where it was suggested that the lesson Basic HTML and HTML5: Create a Set of Radio Buttons should reflect the best practice guidelines from the Mozilla documentation.
The issue was closed and now the lesson includes the following:
It is considered best practice to set the for attribute for assistive technologies to be able to link the relationship between the label and the child elements such as an input in this case.
Yet:
- If the goal is teaching best practice, the lesson should explain that the
label
element’sfor
value has to match theinput
element’sid
value as explained in the linked Mozilla documentation page. - The same issue applies to the next lesson: Basic HTML and HTML5: Create a Set of Checkboxes.
- This advice applies not only to clickable
input
elements, the Mozilla page actually discussesinput type="text"
which is covered in a previous lesson: Basic HTML and HTML5: Create a Text Field. - However, keep in mind that this topic is actually covered in its own lesson under: Applied Accessibility: Improve Form Field Accessibility with the label Element
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (15 by maintainers)
Top Results From Across the Web
<input>: The Input (Form Input) element - HTML
Valid for text , search , url , tel , email , password , and number , the placeholder attribute provides a brief...
Read more >4.10 Forms — HTML5 - W3C
Denotes elements that have a form content attribute, and a matching form IDL attribute, that allow authors to specify an explicit form owner....
Read more >HTML input type Attribute - W3Schools
The type attribute specifies the type of <input> element to display. If the type attribute is not specified, the default type is "text"....
Read more >HTML Standard
In particular, familiarity with the basics of DOM is necessary for a complete ... to work with the WHATWG on the development of...
Read more >FreeCodeCamp: Basic HTML and HTML5 | by Eleftheria Batsou
All img elements must have an alt attribute. The text inside an alt attribute is used for screen readers to improve accessibility and...
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
@davinderpalrehal Awesome! It’s all you then. Please let me know if I can do anything to help. Looking forward to seeing your updated challenge(s).
I would love to work on this.