Skip to content

Commit

Permalink
[Docs] control-has-associated-label: fix metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 14, 2022
1 parent 3382059 commit f32d826
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -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 `<html>` 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.
Expand Down Expand Up @@ -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 |
Expand Down
5 changes: 4 additions & 1 deletion scripts/boilerplate/rule.js
Expand Up @@ -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],
},
Expand Down
5 changes: 4 additions & 1 deletion src/rules/control-has-associated-label.js
Expand Up @@ -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],
},

Expand Down

0 comments on commit f32d826

Please sign in to comment.