Ensuring all my images have alt text is important, but I overlooked this when I added my background images to the CSS under the body tag. The following code shows the background image in my CSS that needs alt text:
body
{
background: url('contact.jpg') no-repeat center center fixed;
box-shadow: inset 0 0 0 1000px rgba(0,0,0,.5), 0 0 0 1000px rgba(0,0,0,.5);
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
For other images in the CSS, I've been using:
<span class="background-image" role="img" aria-label="Cook in the rue de Stamboul, Constantinople, Turkey"> </span>
However, since I'm using the body tag for the other background images, there isn't a class to attach alt text to. I'm unsure how to provide alt text for those background images. Any help would be greatly appreciated.