Try adding an ALT tag for avatars

This commit is contained in:
Sam Saffron 2015-12-15 18:00:59 +11:00
parent 4be8de21a1
commit f2bed10087
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ Discourse.Utilities = {
var classes = "avatar" + (options.extraClasses ? " " + options.extraClasses : "");
var title = (options.title) ? " title='" + Handlebars.Utils.escapeExpression(options.title || "") + "'" : "";
return "<img alt='' width='" + size + "' height='" + size + "' src='" + Discourse.getURLWithCDN(url) + "' class='" + classes + "'" + title + ">";
return "<img alt='" + (title || "avatar") + "' width='" + size + "' height='" + size + "' src='" + Discourse.getURLWithCDN(url) + "' class='" + classes + "'" + title + ">";
},
tinyAvatar: function(avatarTemplate, options) {