From 79b975ab7185cc4fbf6a3adea45c78fac2162d77 Mon Sep 17 00:00:00 2001 From: Bryan Mishkin <698306+bmish@users.noreply.github.com> Date: Sun, 30 Oct 2022 11:14:50 -0400 Subject: [PATCH] [Docs] missing descriptions in some rules --- .eslintrc | 1 + README.md | 6 +++--- docs/rules/label-has-for.md | 9 +++++++-- src/rules/accessible-emoji.js | 1 + src/rules/label-has-for.js | 2 ++ src/rules/no-aria-hidden-on-focusable.js | 5 ++--- src/rules/prefer-tag-over-role.js | 1 + 7 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.eslintrc b/.eslintrc index a94e7cb6a..7024a688d 100644 --- a/.eslintrc +++ b/.eslintrc @@ -21,6 +21,7 @@ "files": ["src/rules/*"], "extends": ["plugin:eslint-plugin/rules-recommended"], "rules": { + "eslint-plugin/require-meta-docs-description": ["error", { "pattern": "^(Enforce|Require|Disallow)" }], "eslint-plugin/require-meta-docs-url": [ "error", { "pattern": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/{{name}}.md" }, diff --git a/README.md b/README.md index d74fc210e..5c2e29a03 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ configuration file by mapping each custom component name to a DOM element type. | Name                                          | Description | 💼 | ❌ | | :----------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------- | :---- | :-- | -| [accessible-emoji](docs/rules/accessible-emoji.md) | | | ❌ | +| [accessible-emoji](docs/rules/accessible-emoji.md) | Enforce emojis are wrapped in `` and provide screenreader access. | | ❌ | | [alt-text](docs/rules/alt-text.md) | Enforce all elements that require alternative text have meaningful information to relay back to end user. | ☑️ 🔒 | | | [anchor-ambiguous-text](docs/rules/anchor-ambiguous-text.md) | Enforce `` text to not exactly match "click here", "here", "link", or "a link". | | | | [anchor-has-content](docs/rules/anchor-has-content.md) | Enforce all anchors to contain accessible content. | ☑️ 🔒 | | @@ -139,7 +139,7 @@ configuration file by mapping each custom component name to a DOM element type. | [img-redundant-alt](docs/rules/img-redundant-alt.md) | Enforce `` alt prop does not contain the word "image", "picture", or "photo". | ☑️ 🔒 | | | [interactive-supports-focus](docs/rules/interactive-supports-focus.md) | Enforce that elements with interactive handlers like `onClick` must be focusable. | ☑️ 🔒 | | | [label-has-associated-control](docs/rules/label-has-associated-control.md) | Enforce that a `label` tag has a text label and an associated control. | ☑️ 🔒 | | -| [label-has-for](docs/rules/label-has-for.md) | | | ❌ | +| [label-has-for](docs/rules/label-has-for.md) | Enforce that `