Skip to content

Commit

Permalink
Making sure images are displayed- 46ca7f (#1702)
Browse files Browse the repository at this point in the history
* Making sure images are displayed- 46ca7f

The W3c logo is not displayed at the moment in rule [Element marked as decorative is not exposed](https://act-rules.github.io/rules/46ca7f)

No need for call for Review.

* Update _rules/element-marked-decorative-is-not-exposed-46ca7f.md

Co-authored-by: Trevor R. Bostic <[email protected]>

Co-authored-by: Trevor R. Bostic <[email protected]>
  • Loading branch information
ajanec01 and tbostic32 authored Sep 9, 2021
1 parent ee7ef71 commit 09c38ff
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions _rules/element-marked-decorative-is-not-exposed-46ca7f.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ When these conflicts arise on [decorative][] [non-text content][], this is also
This `img` element is [marked as decorative][] through its `alt` attribute and is not [included in the accessibility tree][] because of the `aria-hidden` attribute.

```html
<img src="test-assets/shared/w3c-logo.png" alt="" aria-hidden="true" />
<img src="/test-assets/shared/w3c-logo.png" alt="" aria-hidden="true" />
```

#### Passed Example 2

This `img` element is [marked as decorative][] through its `alt` attribute and is not [included in the accessibility tree][] because it is `hidden` to everyone.

```html
<img src="test-assets/shared/w3c-logo.png" alt="" hidden />
<img src="/test-assets/shared/w3c-logo.png" alt="" hidden />
```

#### Passed Example 3
Expand All @@ -77,15 +77,15 @@ This `nav` element is [marked as decorative][] through its `role` attribute and
This `img` element is [marked as decorative][] through its empty `alt` attribute and has [semantic role][] of `none`.

```html
<img src="test-assets/shared/w3c-logo.png" alt="" />
<img src="/test-assets/shared/w3c-logo.png" alt="" />
```

#### Passed Example 5

This `img` element is [marked as decorative][] through its `role` attribute and has a [semantic role][] of `none` because own attributes are not required to be exposed and thus do no trigger the [presentational roles conflict resolution][].
This `img` element is [marked as decorative][] through its `role` attribute and has a [semantic role][] of `none` because own attributes are not required to be exposed and thus do not trigger the [presentational roles conflict resolution][].

```html
<img src="test-assets/shared/w3c-logo.png" role="none" alt="W3C logo" />
<img src="/test-assets/shared/w3c-logo.png" role="none" alt="W3C logo" />
```

#### Passed Example 6
Expand Down Expand Up @@ -115,7 +115,7 @@ This `nav` element is [marked as decorative][] through its `role` attribute but
This `img` element is [marked as decorative][] through its empty `alt` attribute but has a non-empty `aria-labelledby` attribute causing it to be [included in the accessibility tree][] with its [implicit role][] of `img`.

```html
<img src="test-assets/shared/w3c-logo.png" alt="" aria-labelledby="label" /> <span hidden id="label">W3C logo</span>
<img src="/test-assets/shared/w3c-logo.png" alt="" aria-labelledby="label" /> <span hidden id="label">W3C logo</span>
```

#### Failed Example 3
Expand All @@ -135,7 +135,7 @@ This `svg` element is [marked as decorative][] through its `role` attribute but
This `img` element is not [marked as decorative][].

```html
<img src="test-assets/shared/w3c-logo.png" aria-label="W3C logo" />
<img src="/test-assets/shared/w3c-logo.png" aria-label="W3C logo" />
```

[decorative]: https://www.w3.org/TR/WCAG21/#dfn-pure-decoration 'WCAG definition of Pure decoration'
Expand Down

0 comments on commit 09c38ff

Please sign in to comment.