Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt
Owen Leonard 7761051a83
Bug 25166: Add "aria-hidden = true" to Font Awesome icons in the OPAC
Font Awesome's accessibility guidelines
(https://fontawesome.com/v4.7.0/accessibility/) suggest that we include
'aria-hidden="true"' in the icon markup. This prevents screen
readers from trying to read the icon. This patch adds the attribute.

To test apply the patch and browse the OPAC looking for any problems
with icons: On search results, bibliographic details page, the cart,
lists, etc.

Check the source and verify that Font Awesome icons have the
"aria-hidden" attribute.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Attribute present, all looks good. The 'aria-label' attribute is
not translatable, but it's another problem.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-29 17:28:04 +01:00

200 lines
14 KiB
Text

[% USE Koha %]
[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Recent comments</title>
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
<link rel="alternate" type="application/rss+xml" title="[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog recent comments" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-showreviews.pl?format=rss" />
</head>
[% INCLUDE 'bodytag.inc' bodyid='opac-showreviews' bodyclass='scrollto' %]
[% INCLUDE 'masthead.inc' %]
<div class="main">
<ul class="breadcrumb">
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
<li><a href="#">Recent comments</a></li>
</ul>
<div class="container-fluid">
<div class="row-fluid">
[% IF ( OpacNav || OpacNavBottom ) %]
<div class="span2">
<div id="navigation">
[% INCLUDE 'navigation.inc' %]
</div>
</div>
<div class="span10">
[% ELSE %]
<div class="span12">
[% END %]
<div id="showreviews" class="searchresults maincontent">
<h3>Recent comments <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-showreviews.pl?format=rss" class="rsssearchlink" aria-label="Subscribe to recent comments"><i class="fa fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to recent comments"></i></a></h3>
<table class="table table-striped">
[% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %]
[% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
[% FOREACH review IN reviews %]
<tr>
<td>
<p>
[% IF ( BiblioDefaultViewmarc ) %]
<a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
[% ELSE %]
[% IF ( BiblioDefaultViewisbd ) %]
<a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
[% ELSE %]
<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber |url %]#comments" title="View details for this title">
[% END %]
[% END %]
[% INCLUDE 'biblio-title.inc' biblio=review %]
</a>
[% IF ( review.author ) %]
by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% review.author |url %]" title="Search for works by this author" class="author">[% review.author | html %]</a>
[% END %]
</p>
<p>
<span class="results_summary">
<span class="label">Publication:</span>
[% IF ( review.place ) %][% review.place | html %] [% END %]
[% IF ( review.publishercode ) %][% review.publishercode | html %][% END %]
[% IF ( review.publicationyear ) %]
[% review.publicationyear | html %]
[% ELSE %]
[% IF ( review.copyrightdate ) %]
[% review.copyrightdate | html %]
[% END %]
[% END %]
[% IF ( review.pages ) %]. [% review.pages | html %][% END %]
[% IF ( review.notes ) %], [% review.notes | html %][% END %]
[% IF ( review.size ) %] [% review.size | html %][% END %]
</span>
[% IF ( review.summary ) %]
<span class="result_summary">
[% review.summary | html %]
</span>
[% END %]
[% IF ( review.copyrightdate ) %]
<span class="results_summary">
<span class="label">Date:</span>
[% review.copyrightdate | html %]</span>
[% END %]
</p>
<p class="commentline[% IF ( review.your_comment ) %] yours[% END %]">
[% IF ( review.avatarurl ) %]
<img class="avatar" src="[% review.avatarurl | html %]" height="40" width="40" alt="" />
[% END %]
[% FILTER html_break %]
[% review.review | html %]
[% END %]
<span class="commenter">
[% IF review.your_comment %]
Added [% review.datereviewed | $KohaDates %] by you
[% ELSE %]
[% IF ( review.borrowernumber && ShowReviewer != "none" ) %]
Added [% review.datereviewed | $KohaDates %] by
[% SWITCH ShowReviewer %]
[% CASE 'full' %]
[% review.borrtitle | html %] [% review.firstname | html %] [% review.surname | html %]
[% CASE 'first' %]
[% review.firstname | html %]
[% CASE 'surname' %]
[% review.surname | html %]
[% CASE 'firstandinitial' %]
[% review.firstname | html %] [% review.surname|truncate(2,'.') | html %]
[% CASE 'username' %]
[% review.userid | html %]
[% END %]
[% END %]
[% END %]
</span>
</p>
</td>
<td>
[% IF ( review.BiblioDefaultViewmarc ) %]
<a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
[% ELSE %]
[% IF ( review.BiblioDefaultViewisbd ) %]
<a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
[% ELSE %]
<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber |url %]#comments" title="View details for this title">
[% END %]
[% END %]
[% IF ( AdlibrisEnabled && review.normalized_isbn ) %]
<img src="[% AdlibrisURL | html %]?isbn=[% review.normalized_isbn | html %]" class="adlibris-cover" alt="Adlibris cover image" />
[% END %]
[% IF ( OPACAmazonCoverImages ) %]
[% IF ( review.normalized_isbn ) %]
<img src="https://images-na.ssl-images-amazon.com/images/P/[% review.normalized_isbn | html %].01.TZZZZZZZ.jpg" alt="" class="thumbnail" />
[% ELSE %]
<span class="no-image">No cover image available</span>
[% END %]
[% END %]
[% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
<img src="https://secure.syndetics.com/index.aspx?isbn=[% review.normalized_isbn | html %]/SC.GIF&amp;client=[% SyndeticsClientCode | html %]&amp;type=xw10&amp;upc=[% review.normalized_upc | html %]&amp;oclc=[% review.normalized_oclc | html %]" alt="" class="thumbnail" />
[% END %]
[% IF ( GoogleJackets ) %]
[% IF ( review.normalized_isbn ) %]
<div title="[% review.biblionumber |url %]" class="[% review.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
[% ELSE %]
<span class="no-image">No cover image available</span>
[% END %]
[% END %]
</a>
[% bt_id = ( review.normalized_upc || review.normalized_isbn ) %]
[% IF ( BakerTaylorEnabled ) %]
[% IF ( bt_id ) %]
<a href="https://[% review.BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% review.BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
[% ELSE %]
<span class="no-image">No cover image available</span>
[% END %]
[% END %]
[% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
<a class="custom_cover_image" href="[% review.biblio_object.custom_cover_image_url | url %]"><img alt="Cover image" src="[% review.biblio_object.custom_cover_image_url | url %]" /></a>
[% END %]
</td>
</tr>
[% END # / FOREACH review %]
</table>
[% IF ( PAGE_NUMBERS ) %]
<div class="pages">
<!-- Row of numbers corresponding to showreviews result pages -->
[% IF ( previous_page_offset ) %]
<a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=[% previous_page_offset | html %]&count=[% results_per_page | html %]">&lt;&lt; Previous</a>
[% ELSE %]
[% IF ( previous_page_first ) %]
<a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=0&count=[% results_per_page | html %]">&lt;&lt; Previous</a>
[% END %]
[% END %]
[% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %]
[% IF ( PAGE_NUMBER.highlight ) %]
<span class="currentPage">[% PAGE_NUMBER.pg | html %]</span>
[% ELSE %]
<a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=[% PAGE_NUMBER.offset | html %]&count=[% results_per_page | html %]">[% PAGE_NUMBER.pg | html %]</a>
[% END %]
[% END %]
[% IF ( next_page_offset ) %]
<a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=[% next_page_offset | html %]&count=[% results_per_page | html %]">Next &gt;&gt;</a>
[% END %]
</div>
[% END # / IF PAGE_NUMBERS %]
</div> <!-- / #showreviews -->
</div> <!-- / .span10/12 -->
</div> <!-- / .row-fluid -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
<script>
//<![CDATA[
$(document).ready(function(){
[% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
});
//]]>
</script>
[% END %]