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

Use <label for='...'> #12

Open
Gaelan opened this issue Dec 21, 2015 · 0 comments
Open

Use <label for='...'> #12

Gaelan opened this issue Dec 21, 2015 · 0 comments

Comments

@Gaelan
Copy link

Gaelan commented Dec 21, 2015

Currently, the labels on the login form (maybe others) are unassociated with their fields. Problems with this:

  • Capybara doesn't recognize the label as the field's name (fill_in 'Email', with: '[email protected]' doesn't work)
  • Screen readers presumably can tell the user what a field is for if the screen reader can find the label.
  • Clicking on an associated label focuses the text box, where clicking an unassociated label does nothing.

This can be solved by setting the for attribute on labels to the ID of the associated fields.

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