- Can you use alt on background image?
- Do you need alt tag for background image?
- How do I make a background image accessible?
- When should you not use alt?
Can you use alt on background image?
Answer. CSS background images should not have alternative text if the image is truly a background image. Decorative (i.e removing it from the page causes no impact to the page's meaning or function) CSS background images do not need additional markup.
Do you need alt tag for background image?
Dividers and background images are common examples. Therefore, purely decorative graphics don't need alt text because they don't add value and could even confuse or clutter the screen reader experience. Read 8 Common Image Alt Text Mistakes to Stop Making to learn more.
How do I make a background image accessible?
If you are using an inline <img> tag there is the alt= attribute and other aria-* attributes you can use to make the image accessible.
When should you not use alt?
Including alt text for decorative images or items
Decorative items such as dividers or design items that don't provide additional context or content don't need alt text. They don't add to the information a user needs and they make little sense, or are unnecessary, when read with a screen reader.