surveys icon indicating copy to clipboard operation
surveys copied to clipboard

Bad copy for `alt` question

Open JimDabell opened this issue 1 year ago • 4 comments

What other techniques are part of your regular accessibility strategy?

Descriptive alt text

Providing alt text that describes the purpose or content of an image.

This is not what alt text is for. Alt text is for a textual alternative to the image, not a description of it. There is discussion of this in HTML5 § 4.8.4.4 Requirements for providing text to act as an alternative for images.

Suggestion:

What other techniques are part of your regular accessibility strategy?

alt text

Providing text alternatives for images.

JimDabell avatar Sep 23 '23 16:09 JimDabell

One way to think of alternative text is to think about how you would read the page containing the image to someone over the phone, without mentioning that there is an image present. Whatever you say instead of the image is typically a good start for writing the alternative text.

I'm not arguing with you about what the guidelines say, but I do find it weird, it seems contrary to how alt text is used in practice. Following that logic, any image that doesn't serve a functional purpose should just not have alt text?

SachaG avatar Sep 23 '23 21:09 SachaG

Alt text is for a textual alternative to the image, not a description of it.

Isn't that exactly what "describing the content" of the image is? FWIW the current wording was proposed by @ljwatson, so I'm a little hesitant to change it 🤔

@SachaG Btw I tried to add this link (https://html.spec.whatwg.org/multipage/images.html#alt ) that @JimDabell shared above as a resource for this item (since adding reading list items for the a11y things was requested more than once), but these don't seem to have entities?

LeaVerou avatar Sep 25 '23 14:09 LeaVerou

That's correct, they're not entities currently. But you can add them, it should work fine.

SachaG avatar Sep 25 '23 21:09 SachaG

Consider a link that takes you to the previous page in a list of items, consisting solely of an image with an arrow pointing left. A description of that image would be “Leftwards arrow”. A textual alternative to that image would be “Previous page”. The correct text to use for the alt attribute would be the latter, not the former.

JimDabell avatar Dec 28 '23 09:12 JimDabell