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

No option to bind ID to input #25

Open
sjmaceyful opened this issue Jun 10, 2019 · 4 comments
Open

No option to bind ID to input #25

sjmaceyful opened this issue Jun 10, 2019 · 4 comments

Comments

@sjmaceyful
Copy link

There's currently no way to bind an ID attribute directly to the input. I have opened a pull request with the option to specify an inputId.

#24 Adds input ID

@btecu
Copy link
Owner

btecu commented Jun 14, 2019

Thanks for the pull request @sjmaceyful. What is the use case for having a specific id?

@sjmaceyful
Copy link
Author

@btecu It’s web standards. Any input should have an associated label with the for attribute matching the input’s ID.

@btecu
Copy link
Owner

btecu commented Jun 14, 2019

I'm not aware of any of those requirements. Currently there is no label and even if there was, for is completely optional. What am I missing?

@sjmaceyful
Copy link
Author

It is optional, but best practice is to provide a label for all inputs. There isn’t one in the component, so in order to add one you need to be able to set the ID on the input.

It’s also a requirement for accessibility.

https://www.w3.org/WAI/tutorials/forms/labels/

It’s a very standard practice.

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