Skip to content
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

[Passmarked] Kevin Wachira suggested a edit #8

Open
passmarkedbot opened this issue Aug 4, 2017 · 0 comments
Open

[Passmarked] Kevin Wachira suggested a edit #8

passmarkedbot opened this issue Aug 4, 2017 · 0 comments

Comments

@passmarkedbot
Copy link

A edit was suggested from the library page - https://passmarked.com/library/compatibility/html/any-input-descendant-of-a-label-element-with-a-for-attribute-must-have-an-id-value-that-matches-that-for-attribute.

The documentation of the rule should be in docs/any-input-descendant-of-a-label-element-with-a-for-attribute-must-have-an-id-value-that-matches-that-for-attribute.md

The suggested content is:

The for label specifies which input a label is bound to.  A label should be bound to the id of the input.
# How to Fix
<form action="/action_page.php">
  <label for="male">Male</label>
  <input type="radio" name="gender" id="male" value="male">
</form>
# Resources
* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label)
* [w3school](https://www.w3schools.com/tags/att_label_for.asp)

User agent of user: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant