From bffeaeb2ee311653ab3d9fdf9a0ac5dccd7ec1a2 Mon Sep 17 00:00:00 2001 From: nina martinez Date: Fri, 9 May 2025 15:27:40 +0200 Subject: [PATCH] Bug 39890: Add search, menu and footer skip links to the OPAC. Before starting the test plan, you have to enable the following system preferences: CurbsidePickup, useDischarge, OPACHoldsHistory, ILLModule,EnhancedMessagingPreferencesOPAC, CookieConsent, OPACPrivacy, opacreadinghistory, UseRecalls, OPACHoldRequests, RoutingSerials, EnableOpacSearchHistory, virtualshelves,suggestion, OPACViewOthersSuggestions, TagsEnabled, OpacTopissue,OPACVirtualCard. Test plan: A) Add skip link to menu 1. Apply the patch, you don't have to be logged in for this part. 2. Go to these different pages: search result page, record details page (try the different views), and Most popular page. 3. Try navigating with the keyboard, fix the focus at the top of the page 4. You should see a skip link in red, 'skip to menu' appear. After pressing enter, the focus should be on the menu. 5. Now go to these different pages: Purchase suggestions page, search history page, Lists page. 6. Repeat the third step and check if the skip link "Skip to menu" does not appear on these pages. 7. Now you have to log in to a patron account. 8. Go to your Summary page. 9. Repeat the third step with the different pages of the menu (Summary, Charges, Personal details, Consents, Tags, Change password, Search history, Checkout history, Privacy, Holds history, Recalls history, Purchase suggestions, Messaging, Lists, Ask for discharge, Interlibrary loan request, Curbside pickups, My virtual card). 10. You should see the "Skip to menu" link, after pressing enter, the focus should be on the menu. B) Add a skip link to the search box 1. Try navigating with the keyboard, fix the focus on the top of the page. 2. Check if there is a skip link "Skip to the search" in red on each page of the OPAC, except on the advanced search page. C) Add a skip link to the footer 1. Try navigating with the keyboard, fix the focus at the top of the OPAC page. 2. Check if there is a skip link 'Skip to footer' after the skip link 'Skip to main content' on each page of the OPAC. 3. Now, disable the system preferences (OPACReportProblem and KohaAdminEmailAddress, CookieConsent, OpacKohaUrl, OpacLangSelectorMode = 'both', or OpacLangSelectorMode = 'footer') to remove the OPAC footer. 4. Repeat step 2. Now, you should not have the skip link to the footer. D) If all the tests succeed, sign off ! --- .../opac-tmpl/bootstrap/css/src/opac.scss | 2 +- .../bootstrap/en/includes/masthead.inc | 9 +++++ .../bootstrap/en/includes/opac-bottom.inc | 2 +- .../en/includes/opac-detail-sidebar.inc | 2 +- .../bootstrap/en/includes/opac-facets.inc | 2 +- .../bootstrap/en/includes/opac-topissues.inc | 2 +- .../bootstrap/en/includes/usermenu.inc | 2 +- .../bootstrap/en/modules/errors/errorpage.tt | 2 +- .../bootstrap/en/modules/opac-ISBDdetail.tt | 2 +- .../bootstrap/en/modules/opac-MARCdetail.tt | 2 +- .../bootstrap/en/modules/opac-account.tt | 2 +- .../en/modules/opac-curbside-pickups.tt | 2 +- .../bootstrap/en/modules/opac-detail.tt | 4 +- .../bootstrap/en/modules/opac-discharge.tt | 2 +- .../bootstrap/en/modules/opac-holdshistory.tt | 2 +- .../bootstrap/en/modules/opac-illrequests.tt | 2 +- .../bootstrap/en/modules/opac-memberentry.tt | 2 +- .../bootstrap/en/modules/opac-messaging.tt | 2 +- .../bootstrap/en/modules/opac-passwd.tt | 2 +- .../en/modules/opac-patron-consent.tt | 2 +- .../bootstrap/en/modules/opac-privacy.tt | 2 +- .../en/modules/opac-readingrecord.tt | 2 +- .../bootstrap/en/modules/opac-recall.tt | 2 +- .../bootstrap/en/modules/opac-recalls.tt | 2 +- .../en/modules/opac-routing-lists.tt | 2 +- .../en/modules/opac-search-history.tt | 2 +- .../bootstrap/en/modules/opac-shelves.tt | 2 +- .../bootstrap/en/modules/opac-suggestions.tt | 2 +- .../bootstrap/en/modules/opac-tags.tt | 2 +- .../bootstrap/en/modules/opac-topissues.tt | 2 +- .../bootstrap/en/modules/opac-user.tt | 2 +- .../bootstrap/en/modules/opac-virtual-card.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/js/global.js | 39 +++++++++++++++++++ 33 files changed, 80 insertions(+), 32 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss index 5f182f644a..0096ab51e3 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss @@ -2752,7 +2752,7 @@ $star-selected: #EDB867; /* end browse search */ /* Skip to content link. CSS adapted from https://webaim.org/ */ -#scrolltocontent { +#scrolltocontent, #scrolltofooter, #scrolltomenu, #scrolltosearch { background: #C60000; border: 1px solid #FFF; border-radius: 0 0 4px 0; diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index e31b6ac89d..4b3686bb23 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -18,7 +18,16 @@ [% SET CookieConsentPopup = AdditionalContents.get( location => "CookieConsentPopup", lang => lang, library => branchcode || default_branch ) %] [% SET AllPublicBranches = Branches.all( search_params => { public => 1 }, selected => opac_name ) %] +[% UNLESS ( advsearch ) %] + +[% END %] +[% IF ( ( IsPatronPage && loggedinusername ) || opacfacets || IsMenuPage ) %] + +[% END %] +[% IF ( Koha.Preference('OPACReportProblem') && Koha.Preference('KohaAdminEmailAddress') ) || Koha.Preference( 'CookieConsent' ) || OpacKohaUrl || ( ( OpacLangSelectorMode == 'both' || OpacLangSelectorMode == 'footer') ) %] + +[% END %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc index 8b2fd7368a..c7c71f381f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -23,7 +23,7 @@ [% IF ( Koha.Preference('OPACReportProblem') && Koha.Preference('KohaAdminEmailAddress') ) || Koha.Preference( 'CookieConsent' ) || OpacKohaUrl || ( ( OpacLangSelectorMode == 'both' || OpacLangSelectorMode == 'footer') ) %] -