microsoft/eslint-plugin-fluentui-jsx-a11y

Accessibility Rule: input fields must have accessible labelling

Closed this issue · 0 comments

Accessibility Rule: Input fields must have labelling

See if this can be handled by jsx-eslint/eslint-plugin-jsx-a11y
configuration, if not, write a new lint rule.

You can use this repo to see if the existing rules work: https://github.com/aubreyquinn/eslint-plugin-a11y-test

https://react.fluentui.dev/?path=/docs/components-input--default

Good

<label for="firstname">First name:</label>
<input type="text" name="firstname" id="firstname">

Bad

<label>First name:</label>
<input type="text">