Skip to content

Commit 0bc6378

Browse files
lb-ljharb
authored andcommitted
[Docs] label-has-associated-control: add line breaks for readability
1 parent 30d2318 commit 0bc6378

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/rules/label-has-associated-control.md

+4
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,13 @@ This rule takes one optional object argument of type object:
104104
```
105105

106106
`labelComponents` is a list of custom React Component names that should be checked for an associated control.
107+
107108
`labelAttributes` is a list of attributes to check on the label component and its children for a label. Use this if you have a custom component that uses a string passed on a prop to render an HTML `label`, for example.
109+
108110
`controlComponents` is a list of custom React Components names that will output an input element. [Glob format](https://linuxhint.com/bash_globbing_tutorial/) is also supported for specifying names (e.g., `Label*` matches `LabelComponent` but not `CustomLabel`, `????Label` matches `LinkLabel` but not `CustomLabel`).
111+
109112
`assert` asserts that the label has htmlFor, a nested label, both or either. Available options: `'htmlFor', 'nesting', 'both', 'either'`.
113+
110114
`depth` (default 2, max 25) is an integer that determines how deep within a `JSXElement` label the rule should look for text content or an element with a label to determine if the `label` element will have an accessible label.
111115

112116
### Fail

0 commit comments

Comments
 (0)