Skip to content

Commit

Permalink
Update example descriptions for rule - 'aria-* attribute is d… (#1237)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeeyyy committed Mar 20, 2020
1 parent 984f2af commit ada6b00
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions _rules/aria-attr-defined-5f99a7.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Any attribute that starts with `aria-`.

## Expectation

Each target attribute is defined in [WAI-ARIA Specifications](#wai-aria-specifications).
Each target attribute is defined in [WAI-ARIA Specifications][].

## Assumptions

Expand All @@ -42,23 +42,23 @@ There are no major accessibility support issues known for this rule.

#### Passed Example 1

A valid ARIA 1.1 attribute `aria-atomic` is used on element `article`.
This `article` element has an `aria-atomic` attribute which is defined in [WAI-ARIA Specifications][].

```html
<article aria-atomic="true">This is a description of something cool...</article>
```

#### Passed Example 2

A valid ARIA 1.1 attribute `aria-modal` on element `div` with role `dialog`
This `div` element with a role of `dialog` has an `aria-modal` attribute which is defined in [WAI-ARIA Specifications][].

```html
<div role="dialog" aria-modal="true">Contains modal content...</div>
```

#### Passed Example 3

A valid ARIA 1.1 attribute `aria-live` on element `div` with role `alert`
This `div` element with a role of `alert` has an `aria-live` attribute which is defined in [WAI-ARIA Specifications][].

```html
<div role="alert" aria-live="assertive">
Expand All @@ -68,7 +68,7 @@ A valid ARIA 1.1 attribute `aria-live` on element `div` with role `alert`

#### Passed Example 4

Multiple valid ARIA 1.1 attributes `aria-*` are specified on element `input` with role `spinbutton`
This `input` element with a role of `spinbutton` has multiple `aria-*` attributes specified which are all defined in [WAI-ARIA Specifications][].

```html
<input role="spinbutton" aria-valuemax="100" aria-valuemin="0" aria-valuenow="25" type="number" value="25" />
Expand All @@ -78,15 +78,15 @@ Multiple valid ARIA 1.1 attributes `aria-*` are specified on element `input` wit

#### Failed Example 1

`aria-not-checked` is not a defined attribute in ARIA 1.1.
This `li` element with a role of `menuitemcheckbox` has an `aria-*` attribute which is not defined in [WAI-ARIA Specifications][].

```html
<li role="menuitemcheckbox" aria-not-checked="true">List Item</li>
```

#### Failed Example 2

`aria-labelled` is not a defined attribute in ARIA 1.1.
This `div` element with a role of `searchbox` has an `aria-*` attribute (`aria-labelled`) which is not defined in [WAI-ARIA Specifications][].

```html
<span id="label">Birthday:</span>
Expand All @@ -99,8 +99,10 @@ Multiple valid ARIA 1.1 attributes `aria-*` are specified on element `input` wit

#### Inapplicable Example 1

Element without `aria-*` attribute.
This `canvas` element does not have an `aria-*` attribute specified.

```html
<canvas> </canvas>
```

[wai-aria specifications]: #wai-aria-specifications 'Definition of WAI-ARIA specifications'

0 comments on commit ada6b00

Please sign in to comment.