Skip to content

Commit

Permalink
chore: note that acc name testing is out of scope
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoFiers committed Jan 15, 2020
1 parent fcfe45c commit 53c2738
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 9 deletions.
2 changes: 2 additions & 0 deletions _rules/button-accessible-name-97a4e1.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Each target element has an [accessible name][] that is not empty (`""`).

**Note**: `input` elements of type `submit` and `reset` can get their [accessible name][] from a [default text](https://www.w3.org/TR/html-aam/#input-type-button-input-type-submit-and-input-type-reset), as well as from a `value` or other attribute.

**Note**: Testing that the [accessible name][] is correct is not part of this rule and must be tested separately.

## Assumptions

- The rule assumes that all buttons are [user interface components as defined by WCAG 2](https://www.w3.org/TR/WCAG21/#dfn-user-interface-components).
Expand Down
20 changes: 12 additions & 8 deletions _rules/explicit-SVG-image-has-name-7d6734.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ The rule applies to any element in the [SVG](https://www.w3.org/2000/svg) namesp

## Expectation

Each target element has an [accessible name](#accessible-name) that is not empty.
Each target element has an [accessible name][] that is not empty.

**Note**: Testing that the [accessible name][] is correct is not part of this rule and must be tested separately.

## Assumptions

Expand Down Expand Up @@ -57,7 +59,7 @@ Until browser support for the [SVG Accessibility API Mappings](https://www.w3.or

#### Passed Example 1

The `svg` element has an explicit role of `img` and an accessible name from the `title` element that is not empty.
The `svg` element has an explicit role of `img` and an [accessible name][] from the `title` element that is not empty.

```html
<p>How many circles are there?</p>
Expand All @@ -69,7 +71,7 @@ The `svg` element has an explicit role of `img` and an accessible name from the

#### Passed Example 2

The `circle` element has an explicit role of `graphics-symbol` and an accessible name from the `aria-label` attribute that is not empty.
The `circle` element has an explicit role of `graphics-symbol` and an [accessible name][] from the `aria-label` attribute that is not empty.

```html
<p>How many circles are there?</p>
Expand All @@ -89,7 +91,7 @@ The `circle` element has an explicit role of `graphics-symbol` and an accessible

#### Passed Example 3

The `svg` element has an explicit role of `graphics-document` and an accessible name from the `title` element that is not empty.
The `svg` element has an explicit role of `graphics-document` and an [accessible name][] from the `title` element that is not empty.

```html
<p>How many circles are there?</p>
Expand All @@ -103,7 +105,7 @@ The `svg` element has an explicit role of `graphics-document` and an accessible

#### Failed Example 1

The `svg` element has an explicit role of `img` but has no accessible name.
The `svg` element has an explicit role of `img` but has no [accessible name][].

```html
<p>How many circles are there?</p>
Expand All @@ -114,7 +116,7 @@ The `svg` element has an explicit role of `img` but has no accessible name.

#### Failed Example 2

The `svg` element has an explicit role of `img` but has only whitespace in the `title` element for the accessible name.
The `svg` element has an explicit role of `img` but has only whitespace in the `title` element for the [accessible name][].

```html
<p>How many circles are there?</p>
Expand All @@ -126,7 +128,7 @@ The `svg` element has an explicit role of `img` but has only whitespace in the `

#### Failed Example 3

The `svg` element has an explicit role of `img`, is included in the accessibility tree, but it has no accessible name because the `title` element is empty.
The `svg` element has an explicit role of `img`, is included in the accessibility tree, but it has no [accessible name][] because the `title` element is empty.

```html
<p>How many circles are there?</p>
Expand All @@ -138,7 +140,7 @@ The `svg` element has an explicit role of `img`, is included in the accessibilit

#### Failed Example 4

The `circle` element has an explicit role of `graphics-symbol` but does not have an accessible name.
The `circle` element has an explicit role of `graphics-symbol` but does not have an [accessible name][].

```html
<p>How many circles are there?</p>
Expand Down Expand Up @@ -178,3 +180,5 @@ The `circle` element has an explicit role that is neither `img`, `graphics-docum
<circle role="graphics-object" cx="50" cy="50" r="40" fill="yellow"></circle>
</svg>
```

[accessible name]: #accessible-name 'Definition of accessible name'
2 changes: 2 additions & 0 deletions _rules/form-control-accessible-name-e086e5.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ This rule applies to any element that is [included in the accessibility tree](#i

Each target element has an [accessible name][] that is not empty (`""`).

**Note**: Testing that the [accessible name][] is correct is not part of this rule and must be tested separately.

## Assumptions

_There are currently no assumptions_
Expand Down
2 changes: 2 additions & 0 deletions _rules/iframe-accessible-name-cae760.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ The rule applies to `iframe` elements that are [included in the accessibility tr

Each target element has an [accessible name][] that is not empty (`""`).

**Note**: Testing that the [accessible name][] is correct is not part of this rule and must be tested separately.

## Assumptions

- The rule assumes that the target `iframe` is used as a [user interface component](https://www.w3.org/TR/WCAG21/#dfn-user-interface-components).
Expand Down
4 changes: 3 additions & 1 deletion _rules/image-accessible-name-23a2a8.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ The rule applies to HTML `img` elements or any HTML element with the [semantic r

Each target element has an [accessible name][] that is not empty (`""`), or is marked as [decorative][].

**NOTE**: An `img` element can be marked as [decorative][], by using either `role="presentation"`, `role="none"` or an empty `alt` attribute, (`alt=""` or `alt` with no value).
**Note**: An `img` element can be marked as [decorative][], by using either `role="presentation"`, `role="none"` or an empty `alt` attribute, (`alt=""` or `alt` with no value).

**Note**: Testing that the [accessible name][] is correct is not part of this rule and must be tested separately.

## Assumptions

Expand Down
2 changes: 2 additions & 0 deletions _rules/image-button-accessible-name-59796f.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ The rule applies to any HTML `input` element with a `type` attribute in the `Ima

Each target element has an [accessible name][] that is not empty (`""`).

**Note**: Testing that the [accessible name][] is correct is not part of this rule and must be tested separately.

## Assumptions

- This rule assumes that all image buttons are [user interface components as defined by WCAG 2](https://www.w3.org/TR/WCAG21/#dfn-user-interface-components).
Expand Down
2 changes: 2 additions & 0 deletions _rules/link-accessible-name-c487ae.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ The rule applies to any HTML element with the [semantic role](#semantic-role) of

Each target element has an [accessible name][] that is not empty (`""`).

**Note**: Testing that the [accessible name][] is correct is not part of this rule and must be tested separately.

## Assumptions

- The rule assumes that all links are [user interface components](https://www.w3.org/TR/WCAG21/#dfn-user-interface-components) as defined by WCAG 2. When the link role is used incorrectly, this assumption may not be true.
Expand Down

0 comments on commit 53c2738

Please sign in to comment.