Skip to content

Instantly share code, notes, and snippets.

@cameroncowden
Created April 5, 2021 17:01
Show Gist options
  • Save cameroncowden/d411eacd010c277b4d46d31ee7f0701b to your computer and use it in GitHub Desktop.
Save cameroncowden/d411eacd010c277b4d46d31ee7f0701b to your computer and use it in GitHub Desktop.
Highlight all Images without Alt Text
/* Courtesy of @AllThingsSmitty "sharing is caring" https://twitter.com/AllThingsSmitty/status/930617039085035520 */
/* highlights any images on the page without alt text or with empty alt text */
/* note - sometimes empty alt text is correct: https://www.w3.org/WAI/tutorials/images/decorative/ */
img[alt=""], img:not([alt]) {
border: red 5px solid;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment