How do I add alt text to background images?


How do I add alternative text to describe background images? Or do I not need to worry about that?


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.

However, CSS background images used to display meaningful images need to have the role="img" attribute and a descriptive aria-label or title attribute.

Free Tools to Continue Learning

Accessible Web Company Logo

Accessible Web RAMP

Monitor your website and manage your progress towards WCAG conformance.

Accessible Web Company Logo

Accessible Web Academy

Career specific courses to help power up your accessibility knowledge.