Bug 28142: Accessibility: OPAC cart/basket checkboxes are not labelled
This patch adds labels to the checkboxes on the "Your cart" page to improve accessibility for users of screen readers. The labels are hidden from display because the item titles provide enough visual context. Test Plan: 1. Go to the OPAC 2. Search for some items and add them to your cart 3. Inspect the page html and confirm the checkboxes are not labelled 4. Select the "More Details" page and confirm these labels are missing too 5. Apply the patch 6. Inspect the checkboxes on the "Brief display" and "more details" views 7. Confirm that the checkboxes have meaningful labels and that the visual display of the pages has not changed. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> JD amended patch: fix indentation Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
9127ab6773
commit
2d6bf5de66
File diff suppressed because one or more lines are too long
|
|
@ -82,6 +82,12 @@
|
|||
[% IF ( verbose ) %]
|
||||
<form action="opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form">
|
||||
[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
|
||||
[% IF BIBLIO_RESULT.title %]
|
||||
[% check_title = BIBLIO_RESULT.title %]
|
||||
[% ELSE %]
|
||||
[% check_title = BIBLIO_RESULT.biblionumber %]
|
||||
[% END %]
|
||||
<label for="bib[% BIBLIO_RESULT.biblionumber | html %]" class="sr-only">[% check_title | html %]</label>
|
||||
<h2>
|
||||
<input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber | html %]" name="bib[% BIBLIO_RESULT.biblionumber | html %]" id="bib[% BIBLIO_RESULT.biblionumber | html %]">
|
||||
[% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT %]
|
||||
|
|
@ -271,6 +277,12 @@
|
|||
[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
|
||||
<tr>
|
||||
<td class="noprint selectcol">
|
||||
[% IF BIBLIO_RESULT.title %]
|
||||
[% check_title = BIBLIO_RESULT.title %]
|
||||
[% ELSE %]
|
||||
[% check_title = BIBLIO_RESULT.biblionumber %]
|
||||
[% END %]
|
||||
<label for="bib[% BIBLIO_RESULT.biblionumber | html %]" class="sr-only">[% check_title | html %]</label>
|
||||
<input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber | html %]" name="bib[% BIBLIO_RESULT.biblionumber | html %]" id="bib[% BIBLIO_RESULT.biblionumber | html %]">
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
|||
Loading…
Reference in New Issue