Skip to content

Commit

Permalink
Added text alternative to SVG images
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGoderre committed Jul 30, 2012
1 parent d9bc1d3 commit cfeaa7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/js/pe-ap-min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/js/workers/multimedia.js
Expand Up @@ -21,7 +21,8 @@
if (pe.svg) {
icon = _pe.fn.multimedia.icons.clone();
icon.children(':not(g[id="' + id + '"])').remove();
return icon;
icon.prepend("<title>" + alt + "</title>");
return icon.attr({"role" : "img", "aria-label" : alt});
}

return $('<img src="' + _pe.add.liblocation + 'images/multimedia/' + id + '.png" alt="' + alt + '" height="20" width="20" />');
Expand Down

0 comments on commit cfeaa7a

Please sign in to comment.