Skip to content

Commit

Permalink
Tweak image-description rule (#2225)
Browse files Browse the repository at this point in the history
* Tweak image-description rule

* Update _rules/image-button-non-empty-accessible-name-59796f.md

Co-authored-by: sage-putnam <[email protected]>

---------

Co-authored-by: sage-putnam <[email protected]>
  • Loading branch information
WilcoFiers and sage-putnam authored Nov 25, 2024
1 parent 5ba46d9 commit 8204303
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _rules/image-button-non-empty-accessible-name-59796f.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Each target element has an [accessible name][] that is neither empty (`""`), nor

## Background

Contrarily to `img` elements, an empty `alt` attribute (`alt=""`) does not make an image button decorative; image buttons have a button role and are therefore exposed as interactive elements. Consequently, an empty `alt` attribute does not provide a "usable string" for image buttons and the computation defaults to other means of providing a name, as defined in [input type="image" Accessible Name Computation algorithm](https://www.w3.org/TR/html-aam/#input-type-image-accessible-name-computation).
Unlike for `img` elements, an empty `alt` attribute (`alt=""`) does not make an image button decorative; image buttons have a button role and are therefore exposed as interactive elements. An empty `alt` attribute therefore does not provide a "usable string" for image buttons and the computation defaults to other means of providing a name, as defined in [input type="image" Accessible Name Computation algorithm](https://www.w3.org/TR/html-aam/#input-type-image-accessible-name-computation).

### Assumptions

Expand All @@ -59,7 +59,7 @@ Contrarily to `img` elements, an empty `alt` attribute (`alt=""`) does not make

### Accessibility Support

The [input type="image" Accessible Name Computation algorithm](https://www.w3.org/TR/html-aam/#input-type-image-accessible-name-computation) uses the first non-empty name, but some user agents and assistive technologies combinations stop at the first existing one, even if empty.
The [input type="image" Accessible Name Computation algorithm](https://www.w3.org/TR/html-aam/#input-type-image-accessible-name-computation) uses the first defined attribute, even if the attribute has an empty value. In contrast, some user agents and assistive technologies ignore empty attributes.

### Related rules

Expand Down Expand Up @@ -178,6 +178,6 @@ The image button is ignored by assistive technologies because it is not [include
```

[accessible name]: #accessible-name 'Definition of Accessible Name'
[attribute value]: #attribute-value:enumerated 'Definition of Attribute Value'
[attribute value]: #attribute-value 'Definition of Attribute Value'
[html aam image button]: https://www.w3.org/TR/html-aam-1.0/#input-type-image 'HTML Accessibility API Mapping, image button'
[included in the accessibility tree]: #included-in-the-accessibility-tree 'Definition of Included in the Accessibility Tree'

0 comments on commit 8204303

Please sign in to comment.