Skip to content

Update labels for best practices#119

Open
aaron-coding wants to merge 1 commit intothomasdavis:gh-pagesfrom
aaron-coding:patch-1
Open

Update labels for best practices#119
aaron-coding wants to merge 1 commit intothomasdavis:gh-pagesfrom
aaron-coding:patch-1

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.

1 participant