Created
February 28, 2013 14:57
-
-
Save ushiushix/5057337 to your computer and use it in GitHub Desktop.
Add img element at the icons for line comments. Enable screen readers recognize the icons.
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
(function() { | |
var elements = document.getElementsByTagName( '*' ); | |
for ( var i = 0, il = elements.length; i < il; i++ ) { | |
var element = elements[i]; | |
if ( /\bmini-icon-add-comment\b/.test( element.className ) ) { | |
var img = document.createElement("img"); | |
img.setAttribute("alt", "*"); | |
element.appendChild(img); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment