Thanks in advance for any help. This is what I am trying to do. I am creating a custom CSS to use when checking a web page for accessibility problems. One of those problems is an image with no alt-text (Description). Accessibility readers use the alt-text when describing images to the visually impaired.
I have successfully created a conditional where the image is filtered with a sepia tone to highlight it is missing the alt-text. But I also would like to either place text next to, or preferably on top of the image that states - "Alt Text is Missing"
This is what I have so far:
/* Locates images missing an Alt-Text */
img[alt=""] {filter: sepia(100%);}
img[alt=""]:after{
content: "Image is missing an Alt text. ";
color: black;
}
The color works but the adding of the text after the image does not. Any ideas? Thanks!