From 9389dc74b9e325b0f931efbcca503f27cac6694a Mon Sep 17 00:00:00 2001 From: nina martinez 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. --- .../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 ) %]
+ + +

- - @@ -32,8 +32,8 @@

- - @@ -49,8 +49,8 @@

- - @@ -60,8 +60,8 @@

- - @@ -82,8 +82,8 @@

- - @@ -111,8 +111,8 @@

- - @@ -124,8 +124,8 @@

Serials

- - @@ -137,8 +137,8 @@

- - @@ -161,8 +161,8 @@

- - @@ -174,7 +174,8 @@

Picture - @@ -187,7 +188,8 @@ - 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 @@ Add to a new list: - + + [% 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 %]
[% IF consent.given_on %] - Yes
- No +
+ [% ELSIF consent.refused_on %] - Yes
- No +
+ [% ELSE %] - Yes
- No +
+ [% END %] [% IF consent.given_on %] 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 %]

-

-
- +
@@ -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 %]" /> 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 @@
Show -

up to subjects

+
-- 2.43.0