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

Demo site should associate labels with text inputs #28

Closed
scottaohara opened this issue Nov 29, 2018 · 3 comments
Closed

Demo site should associate labels with text inputs #28

scottaohara opened this issue Nov 29, 2018 · 3 comments
Labels

Comments

@scottaohara
Copy link
Contributor

As discussed in #24, ids are not necessary to associate labels with their form controls, as long as those form controls are contained within the label. However, if a label is not a parent for its form control, then the label should have a for attribute, pointing to the unique id of the element it is providing the accessible name to.

The text fields on the demo site would fall into this pattern.

@BcRikko
Copy link
Member

BcRikko commented Nov 29, 2018

Does this mean? ↓ 🤔

Unnecessary

<label>
  Input field
  <input type="text" class="input">
</label>

Necessary

<label for="input_field">Input field</label>
<input type="text" class="input" id="input_field">

That's right, I did not know. 😆

Do you know best practices for not duplicating IDs?
Would you teach me for my future? 🙏

@scottaohara
Copy link
Contributor Author

We can have a side conversation sometime about this, yes

@BcRikko
Copy link
Member

BcRikko commented Dec 18, 2018

🎉 This issue has been resolved in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

No branches or pull requests

2 participants