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

Corresponding FormField htmlFor and input id #10

Closed
taysea opened this issue Aug 4, 2021 · 0 comments · Fixed by #28
Closed

Corresponding FormField htmlFor and input id #10

taysea opened this issue Aug 4, 2021 · 0 comments · Fixed by #28
Labels
enhancement New feature or request

Comments

@taysea
Copy link
Collaborator

taysea commented Aug 4, 2021

Please describe what the rule should do:

FormField should have an htmlFor value that matches the id provided to its associated input.

What category of rule is this? (place an "X" next to just one item)

[ ] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)

Provide 2-3 code examples that this rule will warn about:

<FormField htmlFor="Location">
   <TextInput id="Order" />
</FormField>

<FormField htmlFor="Location">
   <TextInput />
</FormField>

<FormField>
   <TextInput id="Order">
</FormField>

Why should this rule be included in eslint-plugin-grommet?

Accessibility best practice.

@taysea taysea added the enhancement New feature or request label Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant