alt
tag is for imagesGuideline 1.1 - Text Alternatives: Provide text alternatives for any non-text content so that it can be changed into other forms people need, such as large print, braille, speech, symbols or simpler language.WCAG 2.0 Guidelines
Nope.
Yes.
Bad things.
The image url might be read instead or just "Image".
Use empty/null alt text for decorative images.
alt=""
allows the screen reader to skip over the image.An image that doesn’t convey any meaning or add information. If the page makes sense without the image, it is probably decorative.
We know we can use aria-hidden="true"
to hide things from screen readers, so can we use it for images?
No, because it is not semantically correct. Use aria-hidden
for icons and other elements you want to hide for screen reader users.
Alt text should be a short and consise description of the image that includes the context. A picture is worth a thousand words, but alt text should not be that long at all.
Yes. It is part of the content on the page.
When in doubt, consult your designer or PM.
You can use eslint-plugin-jsx-a11y's rule for alt-text.