You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/label-has-for.md
+5-2
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,8 @@ This rule takes one optional object argument of type object:
17
17
"vuejs-accessibility/label-has-for": [
18
18
"error",
19
19
{
20
-
"components": ["Label"],
20
+
"components": ["VLabel"],
21
+
"controlComponents": ["VInput"],
21
22
"required": {
22
23
"every": ["nesting", "id"]
23
24
},
@@ -28,7 +29,9 @@ This rule takes one optional object argument of type object:
28
29
}
29
30
```
30
31
31
-
For the `components` option, these strings determine which JSX elements (**always including**`<label>`) should be checked for having the `for` prop. This is a good use case when you have a wrapper component that simply renders a `label` element.
32
+
For the `components` option, these strings determine which elements (**always including**`<label>`) should be checked for having the `for` prop. This is a good use case when you have a wrapper component that simply renders a `label` element.
33
+
34
+
For the `controlComponents` option, these strings determine which elements should be counted as form control elements. By default, this includes `input`, `meter`, `progress`, `select`, and `textarea`. This is a good use case when you have a wrapper component that simplify renders a `input` element.
32
35
33
36
The `required` option (defaults to `"required": { "every": ["nesting", "id"] }`) determines which checks are activated. You're allowed to pass in one of the following types:
0 commit comments