Skip to content

Commit

Permalink
Merge pull request #9761 from Souvik-Cyclic/9629/fix/add-alt-attributes
Browse files Browse the repository at this point in the history
Add [alt] attributes to images
  • Loading branch information
jimchamp authored Sep 5, 2024
2 parents d8f3a8e + 9741d29 commit f4222d3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions openlibrary/i18n/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -7308,6 +7308,10 @@ msgstr[1] ""
msgid "Related Books"
msgstr ""

#: EditionNavBar.html
msgid "Go to next section"
msgstr ""

#: Follow.html
msgid "UnfollowFollow"
msgstr ""
Expand Down
6 changes: 3 additions & 3 deletions openlibrary/macros/EditionNavBar.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</li>
</ul>
$if not desktop_only:
<span class="nav-arrow">
<img src="/static/images/nav-arrow.svg" role="img">
</span>
<button class="nav-arrow" title="$_('Go to next section')">
<img src="/static/images/nav-arrow.svg" alt="">
</button>
</span>
2 changes: 1 addition & 1 deletion openlibrary/templates/account/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h1 class="details-title">$header_title</h1>
$set_share_links(url=request.canonical_url, title=header_title, view_context=ctx)
$if ctx.get('share_links'):
$ share_str = _('Share')
$ share_content = '<a class="cta-btn cta-btn--unstyled share-modal-link icon-link" href="javascript:;" data-ol-link-track="MyBooksModalLinkClick|ShareIcon"><img class="icon-link__image" src="/static/images/icons/share.svg" width="20"> %s</a>' % share_str
$ share_content = '<a class="cta-btn cta-btn--unstyled share-modal-link icon-link" href="javascript:;" data-ol-link-track="MyBooksModalLinkClick|ShareIcon"><img class="icon-link__image" src="/static/images/icons/share.svg" width="20" alt=""> %s</a>' % share_str
$ page_url = request.home
$ share_links = ctx.get('share_links')
$:macros.ShareModal(share_links, page_url, share_content, "share-modal-wrapper", show_embed=False)
Expand Down
2 changes: 1 addition & 1 deletion openlibrary/templates/type/edition/modal_links.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

$ ga_attr = 'data-ol-link-track=%s' % ga_data if ga_data else ''
<a href="$href" class="$link_class icon-link" $ga_attr>
<img class="icon-link__image" src="$img_src">
<img class="icon-link__image" src="$img_src" alt="">
<div class="icon-link__text">$link_text</div>
</a>

Expand Down
2 changes: 1 addition & 1 deletion openlibrary/templates/type/edition/title_and_author.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

$ ga_attr = 'data-ol-link-track=%s' % ga_data if ga_data else ''
<a href="$href" class="$link_class icon-link" $ga_attr>
<img class="icon-link__image" src="$img_src">
<img class="icon-link__image" src="$img_src" alt="">
<div class="icon-link__text">$link_text</div>
</a>

Expand Down
2 changes: 2 additions & 0 deletions static/css/components/nav-bar.less
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@

.nav-arrow {
padding-left: 20px;
background: none;
border: none;

img {
max-width: unset !important;
Expand Down

0 comments on commit f4222d3

Please sign in to comment.