Skip to content

Commit 8204303

Browse files
Tweak image-description rule (#2225)
* Tweak image-description rule * Update _rules/image-button-non-empty-accessible-name-59796f.md Co-authored-by: sage-putnam <163018910+sage-putnam@users.noreply.github.com> --------- Co-authored-by: sage-putnam <163018910+sage-putnam@users.noreply.github.com>
1 parent 5ba46d9 commit 8204303

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Each target element has an [accessible name][] that is neither empty (`""`), nor
5050

5151
## Background
5252

53-
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).
53+
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).
5454

5555
### Assumptions
5656

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

6060
### Accessibility Support
6161

62-
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.
62+
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.
6363

6464
### Related rules
6565

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

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

0 commit comments

Comments
 (0)