diff --git a/README.md b/README.md index c48ae8592..43411bbf4 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ configuration file by mapping each custom component name to a DOM element type. - [aria-unsupported-elements](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md): Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes. - [autocomplete-valid](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md): Enforce that autocomplete attributes are used correctly. - [click-events-have-key-events](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md): Enforce a clickable non-interactive element has at least one keyboard event listener. - +- [control-has-associated-label](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md): Enforce that a control (an interactive element) has a text label. - [heading-has-content](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md): Enforce heading (`h1`, `h2`, etc) elements contain accessible content. - [html-has-lang](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md): Enforce `` element has `lang` prop. - [iframe-has-title](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md): Enforce iframe elements have a title attribute. @@ -168,7 +168,7 @@ configuration file by mapping each custom component name to a DOM element type. | [aria-unsupported-elements](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md) | error | error | | [autocomplete-valid](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md) | error | error | | [click-events-have-key-events](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md) | error | error | -| [control-has-associated-label](undefined) | off | off | +| [control-has-associated-label](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md) | off | off | | [heading-has-content](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md) | error | error | | [html-has-lang](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md) | error | error | | [iframe-has-title](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md) | error | error | diff --git a/scripts/boilerplate/rule.js b/scripts/boilerplate/rule.js index 3741f2c94..b45252c39 100644 --- a/scripts/boilerplate/rule.js +++ b/scripts/boilerplate/rule.js @@ -17,7 +17,10 @@ const schema = generateObjSchema(); export default { meta: { - docs: {}, + docs: { + get description() { throw new SyntaxError('do not forget to add the description!'); }, + get url() { throw new SyntaxError('do not forget to add the URL!'); }, + }, schema: [schema], }, diff --git a/src/rules/control-has-associated-label.js b/src/rules/control-has-associated-label.js index b97ebe558..512a5213f 100644 --- a/src/rules/control-has-associated-label.js +++ b/src/rules/control-has-associated-label.js @@ -39,7 +39,10 @@ const schema = generateObjSchema({ export default ({ meta: { - docs: {}, + docs: { + description: 'Enforce that a control (an interactive element) has a text label.', + url: 'https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md', + }, schema: [schema], },