Koha/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc
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

131 lines
7.4 KiB
HTML

[% USE raw %]
[% USE Biblio %]
<ul id="action">
[% UNLESS ( norequests ) %]
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
[% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
[% IF ( ReservableItems ) %]
<li><a class="reserve btn btn-link btn-lg" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblio.biblionumber | html %]"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a></li>
[% END %]
[% END %]
[% END %]
[% END %]
<li><a class="print-large btn btn-link btn-lg" href="#"><i class="fa fa-fw fa-print" aria-hidden="true"></i> Print</a></li>
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
[% IF artreqpossible %]
<li><a class="article_request btn btn-link btn-lg" href="/cgi-bin/koha/opac-request-article.pl?biblionumber=[% biblio.biblionumber | html %]"><i class="fa fa-fw fa-file-text" aria-hidden="true"></i> Request article</a></li>
[% END %]
[% END %]
[% IF Koha.Preference( 'virtualshelves' ) == 1 %]
[% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername ) %]
<li><a class="addtoshelf btn btn-link btn-lg" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% biblio.biblionumber | html %]"><i class="fa fa-fw fa-list" aria-hidden="true"></i> Save to your lists</a></li>
[% END %]
[% END %]
[% IF Koha.Preference( 'opacbookbag' ) == 1 %]
[% IF ( incart ) %]
<li><a data-biblionumber="[% biblio.biblionumber | html %]" class="addtocart incart cart[% biblio.biblionumber | html %] addrecord btn btn-link btn-lg" href="#"><i class="fa fa-fw fa-shopping-cart" aria-hidden="true"></i> In your cart</a> <a data-biblionumber="[% biblio.biblionumber | html %]" class="cartRemove cartR[% biblio.biblionumber | html %]" href="#">(remove)</a></li>
[% ELSE %]
<li><a data-biblionumber="[% biblio.biblionumber | html %]" class="addtocart cart[% biblio.biblionumber | html %] addrecord btn btn-link btn-lg" href="#"><i class="fa fa-fw fa-shopping-cart" aria-hidden="true"></i> Add to your cart</a> <a style="display:none;" data-biblionumber="[% biblio.biblionumber | html %]" class="cartRemove cartR[% biblio.biblionumber | html %]" href="#">(remove)</a></li>
[% END %]
[% END %]
[% IF Koha.Preference('suggestion') %]
<li><a class="btn btn-link btn-lg" href="/cgi-bin/koha/opac-suggestions.pl?op=add&biblionumber=[% biblio.biblionumber | url %]"><i class="fa fa-fw fa-gift" aria-hidden="true"></i> Suggest for purchase</a></li>
[% END %]
[% IF ( OpacHighlightedWords && query_desc ) %]
<li>
<a href="#" class="highlight_toggle btn btn-link btn-lg" id="highlight_toggle_off"><i class="fa fa-fw fa-pencil" aria-hidden="true"></i> Unhighlight</a>
<a href="#" class="highlight_toggle btn btn-link btn-lg" id="highlight_toggle_on"><i class="fa fa-fw fa-pencil" aria-hidden="true"></i> Highlight</a>
</li>
[% END %]
[% IF ( Koha.Preference('OPACDetailQRCode' ) ) %]
<li>
<a class="show_qrcode btn btn-link btn-lg" href="#"><i class="fa fa-fw fa-qrcode" aria-hidden="true"></i> Send to device</a>
<div id="qrcode" class="hidden"></div>
</li>
[% END %]
[% SET export_options = Koha.Preference('OpacExportOptions').split(',') %]
[% IF export_options.size %]
<li>
<div id="export">
<div class="dropdown">
<a id="format" class="btn btn-link btn-lg dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-fw fa-download" aria-hidden="true"></i> Save record <b class="caret"></b></a>
<ul class="dropdown-menu pull-left" role="menu" aria-labelledby="format">
[% FOREACH option IN export_options %]
[% IF option == 'dc' %]
<li><a role="menuitem" href="#" data-toggle="modal" data-target="#exportModal_">Dublin Core</a></li>
[% ELSE %]
<li>
<a role="menuitem" href="/cgi-bin/koha/opac-export.pl?op=export&amp;bib=[% biblio.biblionumber | html %]&amp;format=[% option | html %]">
[% SWITCH option %]
[% CASE 'bibtex' %]BIBTEX
[% CASE 'endnote' %]EndNote
[% CASE 'marcxml' %]MARCXML
[% CASE 'marc8' %]MARC (non-Unicode/MARC-8)
[% CASE 'utf8' %]MARC (Unicode/UTF-8)
[% CASE 'marcstd' %]MARC (Unicode/UTF-8, Standard)
[% CASE 'mods' %]MODS (XML)
[% CASE 'ris' %]RIS
[% CASE 'isbd' %]ISBD
[% END %]
</a>
</li>
[% END %]
[% END %]
</ul>
</div>
</div>
</li>
[% END %]
[% IF ( OPACSearchForTitleIn ) %]
<li>
<div id="moresearches_menu">
<div class="dropdown">
<a id="furthersearches" class="btn btn-link btn-lg dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-fw fa-search" aria-hidden="true"></i> More searches <b class="caret"></b></a>
<ul class="dropdown-menu pull-left" role="menu" aria-labelledby="furthersearches">
<li><a href="#" class="menu-inactive">Search for this title in:</a></li>
[% OPACSearchForTitleIn | $raw %]
</ul>
</div>
</div>
</li>
[% END %]
</ul>
<!-- Dublin Core Modal Form -->
<div class="modal hide" id="exportModal_" tabindex="-1" role="dialog" aria-labelledby="exportModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3 class="modal-title" id="exportModalLabel">Exporting to Dublin Core...</h3>
</div>
<form method="get" action="/cgi-bin/koha/opac-export.pl">
<div class="modal-body">
<fieldset id="dc_fieldset">
<input id="input-simple" type="radio" name="format" value="rdfdc">
<label class="label_dc" for="input-simple">Simple DC-RDF</label>
<br>
<input id="input-oai" type="radio" name="format" value="oaidc" checked>
<label class="label_dc" for="input-oai">OAI-DC</label>
<br>
<input id="input-srw" type="radio" name="format" value="srwdc">
<label class="label_dc" for="input-srw">SRW-DC</label>
<br>
<input type="hidden" name="op" value="export">
<input type="hidden" name="bib" value="[% biblio.biblionumber | html %]">
</fieldset>
</div>
<div class="modal-footer">
<button type="submit" class="btn">Export</button>
<button class="btn btn-link btn-lg" data-dismiss="modal" aria-hidden="true">Cancel</button>
</div>
</form>
</div>