Skip to content

Commit

Permalink
fixed lint errors in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
aubreyquinn committed Sep 8, 2023
1 parent 27812a9 commit d999e16
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions docs/rules/combobox-needs-labelling-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<!-- end auto-generated rule header -->

Provide labels to identify all form controls, including text fields, checkboxes, radio buttons, and drop-down menus. In most cases, this is done by using the <label> element.
Provide labels to identify all form controls, including text fields, checkboxes, radio buttons, and drop-down menus. In most cases, this is done by using the label element.

https://www.w3.org/WAI/tutorials/forms/labels/
<https://www.w3.org/WAI/tutorials/forms/labels/>

All interactive elements must have an accessible name.

Expand All @@ -15,12 +15,16 @@ This rule aims to...
Examples of **incorrect** code for this rule:

```jsx
<label>Best pet</label><Combobox placeholder="Select an animal" {...props}><Option>{"Cat"}</Option></Combobox>
<label>Best pet</label>
<Combobox placeholder="Select an animal" {...props}><Option>{"Cat"}</Option></Combobox>
```

Examples of **correct** code for this rule:

```jsx
<label id="my-label">Best pet</label><Combobox aria-labelledby="my-label" placeholder="Select an animal" {...props}><Option>{"Cat"}</Option></Combobox>
<label id="my-label">Best pet</label>
<Combobox aria-labelledby="my-label" placeholder="Select an animal" {...props}>
<Option>{"Cat"}</Option>
</Combobox>
```

4 changes: 2 additions & 2 deletions docs/rules/no-empty-components-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<!-- end auto-generated rule header -->

Provide labels to identify all form controls, including text fields, checkboxes, radio buttons, and drop-down menus. In most cases, this is done by using the <label> element.
Provide labels to identify all form controls, including text fields, checkboxes, radio buttons, and drop-down menus. In most cases, this is done by using the label element.

https://www.w3.org/WAI/tutorials/forms/labels/
<https://www.w3.org/WAI/tutorials/forms/labels/>

## Rule Details

Expand Down

0 comments on commit d999e16

Please sign in to comment.