Skip to content

Commit

Permalink
applying changes from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
aubreyquinn committed Feb 17, 2023
1 parent 4514ece commit 4ae86be
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 17 deletions.
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"typescript.updateImportsOnFileMove.enabled": "always",
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.formatOnSave": true,
"markdown.validate.enabled": true,
Expand Down
8 changes: 2 additions & 6 deletions docs/rules/image-button-missing-aria.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,13 @@ This rule aims to prevent an icon button from having no aria label.

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

```js

```jsx
<Button icon={<CalendarMonthRegular />} />

```

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

```js

```jsx
<Button icon={<CalendarMonthRegular />} aria-label="Current month" />
<Button icon={<CalendarMonthRegular />} title="Current month" />

```
8 changes: 2 additions & 6 deletions docs/rules/image-link-missing-aria-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,20 @@ This rule aims to make Image links accessible.

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

```js

```jsx
<Link href="#test"><Image src="/test.png"/></Link>
<Link href="#test" title=""><Image src="/test.png"/></Link>
<Link href="#test"><Image src="/test.png" title=""/></Link>

```

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

```js

```jsx
<Link href="#test"><Image src="/test.png"/>This is a label link</Link>
<Link href="#test" title="This is a title for the link"><Image src="/test.png"/></Link>
<Link href="#test"><Image src="/test.png" title="This is a title for the image link"/></Link>
<Link href="#test"><Image src="/test.png" aria-label="This is an aria-label for the image link"/></Link>
<Link href="#test"><Image src="/test.png" aria-labelledby="id1"/></Link>

```

## When Not To Use It
Expand Down
4 changes: 2 additions & 2 deletions docs/rules/input-missing-label-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ Rule explanation here [https://www.w3.org/WAI/tutorials/forms/labels/](https://w

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

```js
```jsx
<Label>Label name</Label>
<Input id="input-id"/>
```

or

```js
```jsx
<Label htmlFor="input-id">Label name</Label>
<Input/>
```
Expand Down
4 changes: 2 additions & 2 deletions docs/rules/text-area-missing-label-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ This rule aims to prevent that a text area is placed without a label.

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

```js
```jsx
<Label>Label name</Label>
<Textarea id="text-area-id"/>
```

or

```js
```jsx
<Label htmlFor="text-area-id">Label name</Label>
<Textarea/>
```
Expand Down

0 comments on commit 4ae86be

Please sign in to comment.