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

Update labels for best practices #119

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

aaron-coding
Copy link

If you nest input tags inside of the label tags you are linking them together. This allows users to click on the label (not only the box) and automatically focus onto the input box. Also, this format makes it easier for Screen Readers to identify forms to fill out on your form.

One other good alternative is to use is to use attribute, e.g.:

If you nest input tags inside of the label tags you are linking them together. This allows users to click on the label (not only the box) and automatically focus onto the input box. Also, this format makes it easier for Screen Readers to identify forms to fill out on your form.

One other good alternative is to use is to use <label for=""> attribute, e.g.: 
<label for="firstname"></label>
<input id="firstname" name="firstname" type="text" value="<%= user ? user.get('firstname') : '' %>">
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

Successfully merging this pull request may close these issues.

None yet

1 participant