How do I add alt text to background images?

Question

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

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. However, CSS background images used to display meaningful images need to have the role="img" attribute and a descriptive aria-label or title attribute.