Bugzilla – Attachment 183999 Details for
Bug 40330
Accessibility of the OPAC Labels
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40330: Conform and add labels to the OPAC
Bug-40330-Conform-and-add-labels-to-the-OPAC.patch (text/plain), 17.80 KB, created by
Emily Lamancusa (emlam)
on 2025-07-11 14:46:06 UTC
(
hide
)
Description:
Bug 40330: Conform and add labels to the OPAC
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2025-07-11 14:46:06 UTC
Size:
17.80 KB
patch
obsolete
>From 1836a26f24c22add2fd8647ee13d72a183ee3578 Mon Sep 17 00:00:00 2001 >From: nina martinez <nina.martinez@biblibre.com> >Date: Thu, 3 Jul 2025 13:38:35 +0200 >Subject: [PATCH] Bug 40330: Conform and add labels to the OPAC > >Test plan: > >Enable the system preference: marcflavour: choose UNIMAR, >PrivacyPolicyConsent, ILLModule, TagsEnabled, OpacCloud. > >1- Apply the patch >2- Go to the OPAC, log in to a patron account. Go to personal details, > check the html code of the date of birth field, and notice that there > is a aria-hidden="false". >3- Inspect the search bar, and notice in the library select, there is a > label with a for attribute which match the id. >4- Search a record, click on "save to list" and check the Category > select, inspect if the label has a for attribute and match the select > id. >5- Go to interlibrary Loan Request in the user menu, Check if the "Note" > field has a label for attribute which match the id. >6- Go to Consent, check if the checkbox has a label for "Yes" and "No". >7- Go to Suggestions and check that the checkbox has the same id as the > label in the Summary column. >8- Go to "Tag Cloud", inspect the HTML code of the "Tags to show from > other users" label, notice that there is a for attribute which match > the id of the input tag. and check if in the html code there is an > aria-label with the term of the tag. >9- Go to Subject Cloud, check the html code, and notice that there is a > label that surounds the input tag. >10- Go to Advanced Search, click on "More options", and check that all > the additional options have a label with a for attribute which match > the id of the select. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >--- > .../bootstrap/en/includes/calendar.inc | 2 +- > .../bootstrap/en/includes/masthead.inc | 1 + > .../en/includes/subtypes_unimarc.inc | 46 ++++++++++--------- > .../en/modules/opac-addbybiblionumber.tt | 2 +- > .../bootstrap/en/modules/opac-illrequests.tt | 2 +- > .../en/modules/opac-patron-consent.tt | 12 ++--- > .../bootstrap/en/modules/opac-suggestions.tt | 2 +- > .../bootstrap/en/modules/opac-tags.tt | 6 +-- > .../bootstrap/en/modules/opac-tags_subject.tt | 2 +- > 9 files changed, 39 insertions(+), 36 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc >index 54e0e1fde9..240fa9953c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc >@@ -96,7 +96,7 @@ > instance.clear(); > }) > .addClass("fa fa-fw fa-times") >- .attr("aria-hidden", true) >+ .attr("aria-hidden", false) > .attr("aria-label", _("Clear date")) > ) > .keydown(function (e) { >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index 294963397c..0a658a05e3 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -312,6 +312,7 @@ > > [% IF ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 && AllPublicBranches.size > 1 ) %] > <div class="col-sm col-md-3 col-lg-2 order-3 order-sm-4"> >+ <label for="select_library" class="visually-hidden">Search the catalog in:</label> > <select name="limit" id="select_library" class="form-select"> > <option value="">All libraries</option> > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/subtypes_unimarc.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/subtypes_unimarc.inc >index 93c52185e9..e004474b10 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/subtypes_unimarc.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/subtypes_unimarc.inc >@@ -1,8 +1,8 @@ > <fieldset> > <legend>Coded fields</legend> > <p> >- <label>Audience</label> >- <select name="limit" class="subtype"> >+ <label for="audience">Audience</label> >+ <select id="audience" name="limit" class="subtype"> > <option value="" selected="selected">Any</option> > <option value="aud:a">juvenile, general</option> > <option value="aud:b">pre-primary (0-5)</option> >@@ -15,8 +15,8 @@ > </select> > </p> > <p> >- <label>Physical presentation</label> >- <select name="limit" class="subtype"> >+ <label for="physical_presentation">Physical presentation</label> >+ <select id="physical_presentation" name="limit" class="subtype"> > <option value="" selected="selected">Any</option> > <option value="Material-type:r">regular print</option> > <option value="Material-type:d">large print</option> >@@ -32,8 +32,8 @@ > </select> > </p> > <p> >- <label>Literary genre</label> >- <select name="limit" class="subtype"> >+ <label for="literary_genre">Literary genre</label> >+ <select id="literary_genre" name="limit" class="subtype"> > <option value="" selected="selected">Any</option> > <option value="Literature-Code:a">fiction</option> > <option value="Literature-Code:b">drama</option> >@@ -49,8 +49,8 @@ > </select> > </p> > <p> >- <label>Biography</label> >- <select name="limit" class="subtype"> >+ <label for="biography">Biography </label> >+ <select id="biography" name="limit" class="subtype"> > <option value="">Any</option> > <option value="Biography-code:y">not a biography</option> > <option value="Biography-code:a">autobiography</option> >@@ -60,8 +60,8 @@ > </select> > </p> > <p> >- <label>Illustration</label> >- <select name="limit" class="subtype"> >+ <label for="illustration">Illustration</label> >+ <select id="illustration" name="limit" class="subtype"> > <option value="">Any</option> > <option value="Illustration-Code:a">illustrations</option> > <option value="Illustration-Code:b">maps</option> >@@ -82,8 +82,8 @@ > </select> > </p> > <p> >- <label>Content</label> >- <select name="limit" class="subtype"> >+ <label for="content">Content</label> >+ <select id="content" name="limit" class="subtype"> > <option value="">Any</option> > <option value="ctype:a">bibliography</option> > <option value="ctype:b">catalogue</option> >@@ -111,8 +111,8 @@ > </select> > </p> > <p> >- <label>Video types</label> >- <select name="limit" class="subtype"> >+ <label for="video_types">Video types </label> >+ <select id="video_types" name="limit" class="subtype"> > <option value="">Any</option> > <option value="Video-mt:a">motion picture</option> > <option value="Video-mt:b">visual projection</option> >@@ -124,8 +124,8 @@ > <fieldset> > <legend>Serials</legend> > <p> >- <label>Serial type</label> >- <select name="limit" class="subtype"> >+ <label for="serial_type">Serial type </label> >+ <select id="serial_type" name="limit" class="subtype"> > <option value="">Any type</option> > <option value="Type-Of-Serial:a">Periodical</option> > <option value="Type-Of-Serial:b">Monographic series</option> >@@ -137,8 +137,8 @@ > </select> > </p> > <p> >- <label>Periodicity</label> >- <select name="limit" class="subtype"> >+ <label for="periodicity">Periodicity</label> >+ <select id="periodicity" name="limit" class="subtype"> > <option value="">Any</option> > <option value="Frequency-code:a">Daily</option> > <option value="Frequency-code:b">Semiweekly</option> >@@ -161,8 +161,8 @@ > </select> > </p> > <p> >- <label>Regularity</label> >- <select name="limit" class="subtype"> >+ <label for="regularity">Regularity </label> >+ <select id="regularity" name="limit" class="subtype"> > <option value="">Any regularity</option> > <option value="Regularity-code:a">regular</option> > <option value="Regularity-code:b">normalised irregular</option> >@@ -174,7 +174,8 @@ > > <fieldset> > <legend>Picture</legend> >- <select name="limit" class="subtype"> >+ <label for="graphics-type" class="sr-only">Graphics type</label> >+ <select id="graphics-type" name="limit" class="subtype"> > <option value="">Any</option> > <option value="Graphics-type:a">collage</option> > <option value="Graphics-type:b">drawing</option> >@@ -187,7 +188,8 @@ > <option value="Graphics-type:k">technical drawing</option> > <option value="Graphics-type:z">other non-projected graphic type</option> > </select> >- <select name="limit" class="subtype"> >+ <label for="graphics-support" class="sr-only">Graphics support</label> >+ <select id="graphics-support" name="limit" class="subtype"> > <option value="">Any</option> > <option value="Graphics-support:a">canvas</option> > <option value="Graphics-support:b">bristol board</option> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt >index f0423f228d..cd0ff5f477 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt >@@ -98,7 +98,7 @@ > <legend>Add to a new list:</legend> > <label for="newvirtualshelf">List name:</label> > <input type="text" name="newvirtualshelf" id="newvirtualshelf" size="40" /> >- <label for="category">Category:</label> >+ <label for="public">Category:</label> > <select name="public" id="public"> > <option value="0">Private</option> > [% IF (OpacAllowPublicListCreation) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >index d72022a045..109e0cb480 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >@@ -207,7 +207,7 @@ > <li> > <label for="notesopac">Notes:</label> > [% IF !request.completed %] >- <textarea name="notesopac" rows="5" cols="50">[% request.notesopac | html %]</textarea> >+ <textarea id="notesopac" name="notesopac" rows="5" cols="50">[% request.notesopac | html %]</textarea> > [% ELSE %] > [% request.notesopac | html %] > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt >index 41e844034a..7fbad0355a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt >@@ -57,14 +57,14 @@ > [% END %] > <fieldset> > [% IF consent.given_on %] >- <input type="radio" name="check_[% consent_type | html %]" value="1" checked="checked" /> Yes<br /> >- <input type="radio" name="check_[% consent_type | html %]" value="0" /> No >+ <label><input type="radio" name="check_[% consent_type | html %]" value="1" checked="checked" /> Yes</label><br /> >+ <label><input type="radio" name="check_[% consent_type | html %]" value="0" /> No</label> > [% ELSIF consent.refused_on %] >- <input type="radio" name="check_[% consent_type | html %]" value="1" /> Yes<br /> >- <input type="radio" name="check_[% consent_type | html %]" value="0" checked="checked" /> No >+ <label> <input type="radio" name="check_[% consent_type | html %]" value="1" /> Yes</label><br /> >+ <label><input type="radio" name="check_[% consent_type | html %]" value="0" checked="checked" /> No </label> > [% ELSE %] >- <input type="radio" name="check_[% consent_type | html %]" value="1" /> Yes<br /> >- <input type="radio" name="check_[% consent_type | html %]" value="0" /> No >+ <label><input type="radio" name="check_[% consent_type | html %]" value="1" /> Yes</label><br /> >+ <label><input type="radio" name="check_[% consent_type | html %]" value="0" /> No</label> > [% END %] > [% IF consent.given_on %] > <p class="consent_info"><strong>Your consent was registered on [% consent.given_on | html %].</strong></p> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >index 1110e7e77e..bd8775cf11 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >@@ -449,7 +449,7 @@ > [% END %] > <td> > <p> >- <label for="id[% suggestions_loo.suggestionid | html %]"> >+ <label for="id[% suggestion.suggestionid | html %]"> > [% IF suggestion.biblionumber %] > <strong><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% suggestion.biblionumber | uri %]">[% suggestion.title | html %]</a></strong> > [% ELSE %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >index 961e63c745..9acf783097 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >@@ -109,7 +109,7 @@ > > <form method="get" action="opac-tags.pl" class="row"> > <div class="col-auto gx-2 ms-2 my-1"> >- <label> >+ <label for="limit-tag"> > [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] > <span>Tags to show from other users:</span> > [% ELSE %] >@@ -118,7 +118,7 @@ > </label> > </div> > <div class="col-auto gx-2 my-1"> >- <input type="text" name="limit" class="form-control form-control-sm" maxlength="4" size="4" value="[% limit or '100' | html %]" /> >+ <input id="limit-tag" type="text" name="limit" class="form-control form-control-sm" maxlength="4" size="4" value="[% limit or '100' | html %]" /> > </div> > <div class="col-auto gx-2 my-1"> > <input type="submit" value="OK" class="btn btn-sm btn-primary" /> >@@ -185,7 +185,7 @@ > data-title="[% MY_TAG.title | html %]" > data-tagname="[% MY_TAG.term | html %]" > data-tagid="[% MY_TAG.tag_id | html %]" >- aria-label="[% check_title | html %]" >+ aria-label="[% MY_TAG.term | html %]" > /> > </td> > <td class="tagterm"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt >index 5aa3710bc2..b543fcb7e5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt >@@ -38,7 +38,7 @@ > <fieldset> > <legend>Show</legend> > <form class="form-inline" action="/cgi-bin/koha/opac-tags_subject.pl" method="get"> >- <p>up to <input type="text" name="number" value="[% number | html %]" size="4" maxlength="4" /> subjects <input type="submit" class="btn btn-primary" value="OK" /></p> >+ <label>up to <input type="text" name="number" value="[% number | html %]" size="4" maxlength="4" /> </label> <label>subjects <input type="submit" class="btn btn-primary" value="OK" /></label> > </form> > </fieldset> > >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40330
:
183868
|
183890
| 183999