Alt text on images

main
Bob Mottram 2021-02-01 18:58:24 +00:00
parent a8c3129765
commit 4827ae93ac
1 changed files with 11 additions and 5 deletions

View File

@ -242,6 +242,7 @@ def _htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
if faviconUrl: if faviconUrl:
faviconLink = \ faviconLink = \
'<img loading="lazy" src="' + faviconUrl + '" ' + \ '<img loading="lazy" src="' + faviconUrl + '" ' + \
'alt="" ' + \
_getBrokenFavSubstitute() + '/>' _getBrokenFavSubstitute() + '/>'
moderatedItem = item[5] moderatedItem = item[5]
htmlStr += separatorStr htmlStr += separatorStr
@ -266,6 +267,7 @@ def _htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
'/newswireunvote=' + dateStrLink + '" ' + \ '/newswireunvote=' + dateStrLink + '" ' + \
'title="' + translate['Remove Vote'] + '">' 'title="' + translate['Remove Vote'] + '">'
htmlStr += '<img loading="lazy" class="voteicon" src="/' + \ htmlStr += '<img loading="lazy" class="voteicon" src="/' + \
'alt="' + translate['Remove Vote'] + '" ' + \
'icons/vote.png" /></a></p>\n' 'icons/vote.png" /></a></p>\n'
else: else:
htmlStr += ' <span class="newswireDateVotedOn">' htmlStr += ' <span class="newswireDateVotedOn">'
@ -291,8 +293,9 @@ def _htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
htmlStr += '<a href="/users/' + nickname + \ htmlStr += '<a href="/users/' + nickname + \
'/newswirevote=' + dateStrLink + '" ' + \ '/newswirevote=' + dateStrLink + '" ' + \
'title="' + translate['Vote'] + '">' 'title="' + translate['Vote'] + '">'
htmlStr += '<img class="voteicon" src="/' + \ htmlStr += '<img class="voteicon" ' + \
'icons/vote.png" /></a>' 'alt="' + translate['Vote'] + '" ' + \
'src="/icons/vote.png" /></a>'
htmlStr += '</p>\n' htmlStr += '</p>\n'
else: else:
htmlStr += '<p class="newswireItem">' + \ htmlStr += '<p class="newswireItem">' + \
@ -355,7 +358,9 @@ def htmlCitations(baseDir: str, nickname: str, domain: str,
'<a href="/users/' + nickname + '/newblog" title="' + \ '<a href="/users/' + nickname + '/newblog" title="' + \
translate['Go Back'] + '" alt="' + \ translate['Go Back'] + '" alt="' + \
translate['Go Back'] + '">\n' translate['Go Back'] + '">\n'
htmlStr += '<img loading="lazy" class="timeline-banner" src="' + \ htmlStr += '<img loading="lazy" class="timeline-banner" ' + \
'alt="' + translate['Timeline banner image'] + '" ' + \
'src="' + \
'/users/' + nickname + '/' + bannerFile + '" /></a>\n' '/users/' + nickname + '/' + bannerFile + '" /></a>\n'
htmlStr += \ htmlStr += \
@ -465,6 +470,7 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str,
htmlStr += \ htmlStr += \
'<a href="/users/' + nickname + '/' + defaultTimeline + '">' + \ '<a href="/users/' + nickname + '/' + defaultTimeline + '">' + \
'<img loading="lazy" class="timeline-banner" ' + \ '<img loading="lazy" class="timeline-banner" ' + \
'alt="' + translate['Timeline banner image'] + '" ' + \
'src="/users/' + nickname + '/' + bannerFile + '" /></a>\n' 'src="/users/' + nickname + '/' + bannerFile + '" /></a>\n'
htmlStr += '<div class="col-right-mobile">\n' htmlStr += '<div class="col-right-mobile">\n'
@ -532,8 +538,8 @@ def htmlEditNewswire(cssCache: {}, translate: {}, baseDir: str, path: str,
translate['Switch to timeline view'] + '" alt="' + \ translate['Switch to timeline view'] + '" alt="' + \
translate['Switch to timeline view'] + '">\n' translate['Switch to timeline view'] + '">\n'
editNewswireForm += '<img loading="lazy" class="timeline-banner" src="' + \ editNewswireForm += '<img loading="lazy" class="timeline-banner" src="' + \
'/users/' + nickname + '/' + bannerFile + '" /></a>\n' + \ '/users/' + nickname + '/' + bannerFile + '" ' + \
'</header>' 'alt="" /></a>\n</header>'
editNewswireForm += \ editNewswireForm += \
'<form enctype="multipart/form-data" method="POST" ' + \ '<form enctype="multipart/form-data" method="POST" ' + \