question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Basic HTML and HTML5, input elements - incomplete description of the "for" attribute

See original GitHub issue

Challenge 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:

  1. If the goal is teaching best practice, the lesson should explain that the label element’s for value has to match the input element’s id value as explained in the linked Mozilla documentation page.
  2. The same issue applies to the next lesson: Basic HTML and HTML5: Create a Set of Checkboxes.
  3. This advice applies not only to clickable input elements, the Mozilla page actually discusses input type="text" which is covered in a previous lesson: Basic HTML and HTML5: Create a Text Field.
  4. 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:closed
  • Created 6 years ago
  • Comments:19 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
QuincyLarsoncommented, Feb 16, 2018

@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).

1reaction
davinderpalrehalcommented, Feb 16, 2018

I would love to work on this.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found