Skip to content

Commit 36bb8db

Browse files
committed
deleted old text area rule and renamed the input rule
1 parent b12fd16 commit 36bb8db

9 files changed

+6
-172
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Any use of third-party trademarks or logos are subject to those third-party's po
162162
| [dropdown-needs-labelling](docs/rules/dropdown-needs-labelling.md) | Accessibility: Dropdown menu must have an id and it needs to be linked via htmlFor of a Label | ✅ | | |
163163
| [image-button-missing-aria](docs/rules/image-button-missing-aria.md) | Accessibility: Image buttons must have accessible labelling: title, aria-label, aria-labelledby, aria-describedby | ✅ | | |
164164
| [image-link-missing-aria](docs/rules/image-link-missing-aria.md) | Accessibility: Image links must have an accessible name | ✅ | | 🔧 |
165-
| [input-missing-label](docs/rules/input-missing-label.md) | Accessibility: Input fields must have accessible labelling: aria-label, aria-labelledby or an associated label | ✅ | | |
165+
| [input-components-require-accessible-name](docs/rules/input-components-require-accessible-name.md) | Accessibility: Input fields must have accessible labelling: aria-label, aria-labelledby or an associated label | ✅ | | |
166166
| [menu-item-needs-labelling](docs/rules/menu-item-needs-labelling.md) | Accessibility: MenuItem without label must have an accessible and visual label: aria-labelledby | ✅ | | |
167167
| [no-empty-buttons](docs/rules/no-empty-buttons.md) | Accessibility: Button, ToggleButton, SplitButton, MenuButton, CompoundButton must either text content or icon or child component | ✅ | | |
168168
| [no-empty-components](docs/rules/no-empty-components.md) | FluentUI components should not be empty | ✅ | | |
@@ -173,7 +173,6 @@ Any use of third-party trademarks or logos are subject to those third-party's po
173173
| [spin-button-unrecommended-labelling](docs/rules/spin-button-unrecommended-labelling.md) | Accessibility: Unrecommended accessibility labelling - SpinButton | ✅ | | |
174174
| [spinner-needs-labelling](docs/rules/spinner-needs-labelling.md) | Accessibility: Spinner must have either aria-label or label, aria-live and aria-busy attributes | ✅ | | |
175175
| [switch-needs-labelling](docs/rules/switch-needs-labelling.md) | Accessibility: Switch must have an accessible label | ✅ | | |
176-
| [text-area-missing-label](docs/rules/text-area-missing-label.md) | Accessibility: Textarea must have an accessible name | ✅ | | |
177176
| [toolbar-missing-aria](docs/rules/toolbar-missing-aria.md) | Accessibility: Toolbars need accessible labelling: aria-label or aria-labelledby | ✅ | | |
178177
| [tooltip-not-recommended](docs/rules/tooltip-not-recommended.md) | Accessibility: Prefer text content or aria over a tooltip for these components MenuItem, SpinButton | ✅ | | |
179178

docs/rules/input-missing-label.md renamed to docs/rules/input-components-require-accessible-name.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Accessibility: Input fields must have accessible labelling: aria-label, aria-labelledby or an associated label (`@microsoft/fluentui-jsx-a11y/input-missing-label`)
1+
# Accessibility: Input fields must have accessible labelling: aria-label, aria-labelledby or an associated label (`@microsoft/fluentui-jsx-a11y/input-components-require-accessible-name`)
22

33
💼 This rule is enabled in the ✅ `recommended` config.
44

docs/rules/text-area-missing-label.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

lib/applicableComponents/inputBasedComponents.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4-
const applicableComponents = ["Input", "Slider", "DatePicker", "TextArea", "TextField", "TimePicker", "SearchBox"];
4+
const applicableComponents = ["Input", "Slider", "DatePicker", "Textarea", "TextField", "TimePicker", "SearchBox"];
55

66
module.exports = {
77
applicableComponents

lib/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ module.exports = {
1717
"checkbox-needs-labelling": require("./rules/checkbox-needs-labelling"),
1818
"image-button-missing-aria": require("./rules/image-button-missing-aria"),
1919
"image-link-missing-aria": require("./rules/image-link-missing-aria"),
20-
"input-missing-label": require("./rules/input-missing-label"),
20+
"input-components-require-accessible-name": require("./rules/input-components-require-accessible-name"),
2121
"menu-item-needs-labelling": require("./rules/menu-item-needs-labelling"),
2222
"switch-needs-labelling": require("./rules/switch-needs-labelling"),
23-
"text-area-missing-label": require("./rules/text-area-missing-label"),
2423
"toolbar-missing-aria": require("./rules/toolbar-missing-aria"),
2524
"combobox-needs-labelling": require("./rules/combobox-needs-labelling"),
2625
"no-empty-components": require("./rules/no-empty-components"),
@@ -48,10 +47,9 @@ module.exports = {
4847
rules: {
4948
"@microsoft/fluentui-jsx-a11y/checkbox-needs-labelling": "error",
5049
"@microsoft/fluentui-jsx-a11y/image-link-missing-aria": "error",
51-
"@microsoft/fluentui-jsx-a11y/input-missing-label": "error",
50+
"@microsoft/fluentui-jsx-a11y/input-components-require-accessible-name": "error",
5251
"@microsoft/fluentui-jsx-a11y/menu-item-needs-labelling": "error",
5352
"@microsoft/fluentui-jsx-a11y/switch-needs-labelling": "error",
54-
"@microsoft/fluentui-jsx-a11y/text-area-missing-label": "error",
5553
"@microsoft/fluentui-jsx-a11y/image-button-missing-aria": "error",
5654
"@microsoft/fluentui-jsx-a11y/toolbar-missing-aria": "error",
5755
"@microsoft/fluentui-jsx-a11y/combobox-needs-labelling": "error",

lib/rules/text-area-missing-label.js

Lines changed: 0 additions & 57 deletions
This file was deleted.

tests/lib/rules/input-missing-label.js renamed to tests/lib/rules/input-components-require-accessible-name.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const { applicableComponents } = require("../../../lib/applicableComponents/inpu
1111

1212
const RuleTester = require("eslint").RuleTester;
1313

14-
const rule = require("../../../lib/rules/input-missing-label");
14+
const rule = require("../../../lib/rules/input-components-require-accessible-name");
1515

1616
RuleTester.setDefaultConfig({
1717
parserOptions: {

tests/lib/rules/text-area-missing-label.js

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)