Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonjuan committed Dec 18, 2024
1 parent 60f20c1 commit 7d90204
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
23 changes: 12 additions & 11 deletions docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,18 @@

## Accessibility

| Rule | Description | |
| ---------------------------------------------------------- | --------------------------------------------------------------- | --- |
| [no-abstract-roles](rules/no-abstract-roles) | Disallow to use of abstract roles | |
| [no-accesskey-attrs](rules/no-accesskey-attrs) | Disallow to use of accesskey attribute | |
| [no-aria-hidden-body](rules/no-aria-hidden-body) | Disallow to use aria-hidden attributes on the `body` element. | |
| [no-non-scalable-viewport](rules/no-non-scalable-viewport) | Disallow use of `user-scalable=no` in `<meta name="viewport">`. | |
| [no-positive-tabindex](rules/no-positive-tabindex) | Disallow use of positive `tabindex`. | |
| [no-skip-heading-levels](rules/no-skip-heading-levels) | Disallow skipping heading levels | |
| [require-frame-title](rules/require-frame-title) | Require `title` in `<frame>`, `<iframe>` | |
| [require-img-alt](rules/require-img-alt) | Require `alt` attribute at `<img>` tag ||
| [require-meta-viewport](rules/require-meta-viewport) | Enforce to use `<meta name="viewport">` in `<head>` | |
| Rule | Description | |
| ---------------------------------------------------------- | ---------------------------------------------------------------------- | --- |
| [no-abstract-roles](rules/no-abstract-roles) | Disallow to use of abstract roles | |
| [no-accesskey-attrs](rules/no-accesskey-attrs) | Disallow to use of accesskey attribute | |
| [no-aria-hidden-body](rules/no-aria-hidden-body) | Disallow to use aria-hidden attributes on the `body` element. | |
| [no-non-scalable-viewport](rules/no-non-scalable-viewport) | Disallow use of `user-scalable=no` in `<meta name="viewport">`. | |
| [no-positive-tabindex](rules/no-positive-tabindex) | Disallow use of positive `tabindex`. | |
| [no-skip-heading-levels](rules/no-skip-heading-levels) | Disallow skipping heading levels | |
| [require-frame-title](rules/require-frame-title) | Require `title` in `<frame>`, `<iframe>` | |
| [require-img-alt](rules/require-img-alt) | Require `alt` attribute at `<img>` tag ||
| [require-input-label](rules/require-input-label) | Enforces use of label for form elements(`input`, `textarea`, `select`) | |
| [require-meta-viewport](rules/require-meta-viewport) | Enforce to use `<meta name="viewport">` in `<head>` | |

## Style

Expand Down
4 changes: 1 addition & 3 deletions docs/rules/require-input-label.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# require-input-label

This rule enforces the presence of accessible labels for input elements such as `<input type="text">` and `<textarea>`.
This rule enforces the presence of accessible labels for input elements such as `<input type="text">`, `<select>` and `<textarea>`.

## Why?

Expand Down Expand Up @@ -34,5 +34,3 @@ Examples of **correct** code for this rule:
<label>name: <input></label>
<textarea aria-labelledby="foo"></textarea>
```

## Further REading
3 changes: 2 additions & 1 deletion packages/eslint-plugin/lib/rules/require-input-label.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ module.exports = {
type: "code",

docs: {
description: "Enforces the use of label for `<input>` tag",
description:
"Enforces use of label for form elements(`input`, `textarea`, `select`)",
category: RULE_CATEGORY.ACCESSIBILITY,
recommended: false,
},
Expand Down

0 comments on commit 7d90204

Please sign in to comment.