Last active
May 4, 2018 14:17
-
-
Save cscuderi/37ab0813c5ea6993dc1f4072384bccae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Really quick way to dump <img> tags and alt text into the console | |
// Useful for checking a11y | |
let imgs = document.getElementsByTagName('img'); | |
for(var i = 0; i < imgs.length; i++) { | |
console.log('--------------------------------\n', imgs[i], '\nAlt text: '+imgs[i].getAttribute('alt')+'\n'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment