Skip to content

Commit f32d826

Browse files
committed
[Docs] control-has-associated-label: fix metadata
Fixes jsx-eslint#892
1 parent 3382059 commit f32d826

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ configuration file by mapping each custom component name to a DOM element type.
123123
- [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.
124124
- [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.
125125
- [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.
126-
126+
- [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.
127127
- [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.
128128
- [html-has-lang](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md): Enforce `<html>` element has `lang` prop.
129129
- [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.
168168
| [aria-unsupported-elements](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md) | error | error |
169169
| [autocomplete-valid](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md) | error | error |
170170
| [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 |
171-
| [control-has-associated-label](undefined) | off | off |
171+
| [control-has-associated-label](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md) | off | off |
172172
| [heading-has-content](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md) | error | error |
173173
| [html-has-lang](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md) | error | error |
174174
| [iframe-has-title](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md) | error | error |

scripts/boilerplate/rule.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ const schema = generateObjSchema();
1717
1818
export default {
1919
meta: {
20-
docs: {},
20+
docs: {
21+
get description() { throw new SyntaxError('do not forget to add the description!'); },
22+
get url() { throw new SyntaxError('do not forget to add the URL!'); },
23+
},
2124
schema: [schema],
2225
},
2326

src/rules/control-has-associated-label.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ const schema = generateObjSchema({
3939

4040
export default ({
4141
meta: {
42-
docs: {},
42+
docs: {
43+
description: 'Enforce that a control (an interactive element) has a text label.',
44+
url: 'https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md',
45+
},
4346
schema: [schema],
4447
},
4548

0 commit comments

Comments
 (0)