Mercurial > kallithea
changeset 5404:40c6fb22f3d6
misc: remove alt-text from Gravatar images
The alternative text should convey the same information as the image,
something which the text "gravatar" does not. (In a context where the
gravatar is used on its own, the username could be a useful alt-text
- and title-text - but it's not apparent that this is ever the case.)
author | Søren Løvborg <sorenl@unity3d.com> |
---|---|
date | Fri, 14 Aug 2015 16:11:48 +0200 |
parents | 4eb390c2d2bd |
children | aaa2478f9d60 |
files | kallithea/lib/helpers.py kallithea/public/js/base.js |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/helpers.py Mon Aug 17 01:11:42 2015 +0200 +++ b/kallithea/lib/helpers.py Fri Aug 14 16:11:48 2015 +0200 @@ -850,7 +850,7 @@ # here it makes sense to use style="width: ..." (instead of, say, a # stylesheet) because we using this to generate a high-res (retina) size - tmpl = """<img alt="gravatar" class="{cls}" style="width: {size}px; height: {size}px" src="{src}"/>""" + tmpl = '<img alt="" class="{cls}" style="width: {size}px; height: {size}px" src="{src}"/>' # if src is empty then there was no gravatar, so we use a font icon if not src:
--- a/kallithea/public/js/base.js Mon Aug 17 01:11:42 2015 +0200 +++ b/kallithea/public/js/base.js Fri Aug 14 16:11:48 2015 +0200 @@ -1067,7 +1067,7 @@ }; var gravatar = function(link, size, cssclass) { - var elem = '<img alt="gravatar" class="{2}" style="width: {0}px; height: {0}px" src="{1}"/>'.format(size, link, cssclass); + var elem = '<img alt="" class="{2}" style="width: {0}px; height: {0}px" src="{1}"/>'.format(size, link, cssclass); if (!link) { elem = '<i class="icon-user {1}" style="font-size: {0}px;"></i>'.format(size, cssclass); }