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

replace wrapping label with a div #6

Closed
alex-e-leon opened this issue Dec 16, 2015 · 4 comments
Closed

replace wrapping label with a div #6

alex-e-leon opened this issue Dec 16, 2015 · 4 comments

Comments

@alex-e-leon
Copy link
Contributor

Wrapping the checkbox/radio in a label may force some users to create a second label tag if this approach doesn't suit their design. While having multiple labels point to the same input element isn't against spec, anecdotally this may cause accessibility issues (screen readers may only read the first label found). See https://stackoverflow.com/questions/2829936/can-an-input-field-have-two-labels#answer-3992160

Can we follow the lead of the original icheck library and wrap it in a div instead?

@luqin
Copy link
Owner

luqin commented Dec 16, 2015

Hi, @alex-e-leon

<Checkbox
  id="fname"
  name="fname"
  checkboxClass="icheckbox_square-blue"
  increaseArea="20%"
/>
<label for="fname">First name</label>

@luqin
Copy link
Owner

luqin commented Dec 22, 2015

@luqin luqin closed this as completed Dec 26, 2015
@alex-e-leon
Copy link
Contributor Author

@luqin Sorry, I misunderstood how the label functions were supposed to work, looks good to me now. (although I feel like the label stuff would work better as a seperate wrapping component).

@luqin
Copy link
Owner

luqin commented Jan 4, 2016

@alex-e-leon OK. I will support this feature in react-icheck 1.0

@luqin luqin mentioned this issue Jan 4, 2016
6 tasks
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

2 participants