Skip to content

[Passmarked] Kevin Wachira suggested a edit #8

Description

@passmarkedbot

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions