Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt
Wainui Witika-Park d3ab8dbeec Bug 28242: added captions to tables and legends to forms
Ensured that in the OPAC, all tables have relevant captions and all forms have relevant legends.

Many of these have class="sr-only" so they are not visible but will be
available for people who use screen-readers.

To test:
1) Go to OPAC
2) Apply patch and dependencies
3) Check that on all pages, any tables have a caption (many of them will
    not be visible, but will be in the markup code)
4) Check that on all pages, any forms have a legend (many of them will
    not be visible, but will be in the markup code)
5) Check that the captions are appropriate and relevant
6) Check that the legends are appropriate and relevant

Sponsored-by: Catalyst IT

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-06-21 14:05:30 +02:00

210 lines
15 KiB
Text

[% USE Koha %]
[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Recent comments &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</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">
<nav aria-label="breadcrumb">
<ul class="breadcrumb">
<li class="breadcrumb-item">
<a href="/cgi-bin/koha/opac-main.pl">Home</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="#">Recent comments</a>
</li>
</ul>
</nav>
<div class="container-fluid">
<div class="row">
[% IF ( OpacNav || OpacNavBottom ) %]
<div class="col-lg-2">
<div id="navigation">
[% INCLUDE 'navigation.inc' %]
</div>
</div>
<div class="col-10 order-first order-md-first order-lg-2">
[% ELSE %]
<div class="col order-first order-md-first order-lg-2">
[% END %]
<div id="showreviews" class="searchresults maincontent">
<h1>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></h1>
<table class="table table-striped">
<caption class="sr-only">Comments</caption>
[% 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') %]
[% SET custom_cover_image_url = review.biblio_object.custom_cover_image_url %]
[% IF custom_cover_image_url %]
<a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
[% END %]
[% 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> <!-- / .col-lg-10/12 -->
</div> <!-- / .row -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
[% IF ( GoogleJackets ) %]
<script>
$(document).ready(function(){
KOHA.Google.GetCoverFromIsbn();
});
</script>
[% END %]
[% END %]