Changeset - 40c6fb22f3d6
[Not reviewed]
default
0 2 0
Søren Løvborg - 10 years ago 2015-08-14 16:11:48
sorenl@unity3d.com
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.)
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/helpers.py
Show inline comments
 
@@ -850,7 +850,7 @@ def gravatar(email_address, cls='', size
 

	
 
    #  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:
kallithea/public/js/base.js
Show inline comments
 
@@ -1067,7 +1067,7 @@ var autocompleteHighlightMatch = functio
 
};
 

	
 
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);
 
    }
0 comments (0 inline, 0 general)