From e08aa00417f5a008f3f53acf9dfd1389a5733d4e Mon Sep 17 00:00:00 2001 From: nina martinez Date: Wed, 26 Mar 2025 11:58:10 +0100 Subject: [PATCH] Bug 34556: Add an Accessibility Statement Page I added some enhancement in this patch. This patch adds an Accessibility Statement page. To include this page, we propose adding a link in the Koha footer and using the HTML customization tools. This link will appear when you add content in the new HTML customization location: 'OpacAccessibility'. The page title and the link will use the title written in the HTML customizations or 'Accessibility' if none is provided. If there are multiple HTML customizations added for the location 'OpacAccessibility', the first one added will be used for the title by default. If you want a different title than the first one created, you must specify the "Appear in position" field in each 'OpacAccessibility' location and set it to '1' for the one you want to use for the title and link. If you add more than one content entry for this location, they will appear in succession on the page, similar to the title, with the first created or last edited appearing first by default. You can change this order by numbering the positions ("Appear in position" field). Test Plan: 1. Apply the patch. 2. Open the staff interface. 3. Click on 'Tools.' 4. Click on 'HTML Customizations.' 5. Click on 'New entry.' 6. Choose the location 'OpacAccessibility' and 'All libraries'. 7. Add a title (if desired), content and a publication date. 8. Open the OPAC interface. 9. Reduce the, you should see all the text links in the footer disapear and only the icons should remain. Check that is the same for the Acessibility link. Click on the link in the footer (the name should match the title you provided or 'Accessibility'). 10. Verify that the content you added in the HTML customizations appears. 11. Go back to the Staff interface 12. Add another content entry for the same location (with a title and content) but choose a specific library. 13. Set the "Appear in position" to 1 for the new entry. 14. Edit the first entry to set its position to 2. 15. Return to the OPAC interface logged in to a specific library Patron (same library you choose for the second entry) and verify that the link title matches the second title you wrote. 16. Verify that both content appear on the Accessibility page. 17. Go back to the staff interface and add content to the location : 'OpacNav' 18. Edit the second entry to set an expiration date for yesterday. 19. Return to the Opac and check that on the Accessibility page, the OpacNav content appears like the other pages on the left and the content of the second entry doesn't appear. 20. Return to the staff interface and delete all the HTML customizations for the 'OpacAccessibility' location. 21. Return to the OPAC interface. 22. Check that there is no link in the footer. --- .../en/includes/html-customization-help.inc | 2 + .../en/modules/tools/additional-contents.tt | 2 +- .../bootstrap/css/src/_responsive.scss | 1 + .../opac-tmpl/bootstrap/css/src/opac.scss | 1 + .../bootstrap/en/includes/opac-bottom.inc | 9 +++ .../en/modules/opac-accessibility.tt | 59 +++++++++++++++++++ opac/opac-accessibility.pl | 38 ++++++++++++ 7 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-accessibility.tt create mode 100755 opac/opac-accessibility.pl diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc index 1faec6c9fa..4a2839fb7d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc @@ -18,6 +18,8 @@
Include this content in its own section on the reports home page
+
Show this content in the Accessibility page in the OPAC.
+
Include this content in the footer of all pages in the OPAC.
Replace the search box at the top of OPAC pages with this content.
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt index f62690eb20..13c5731733 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt @@ -532,7 +532,7 @@ [% END %] [% END %] [% ELSE %] - [% SET opac_available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'OpacMaintenanceNotice', 'OPACResultsSidebar', 'OpacSuppressionMessage', 'SCOMainUserBlock', 'SelfCheckInMainUserBlock', 'SelfCheckHelpMessage', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'PatronSelfRegistrationAdditionalInstructions', 'ILLModuleCopyrightClearance' ] %] + [% SET opac_available_options = ['OpacAccessibility' ,'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'OpacMaintenanceNotice', 'OPACResultsSidebar', 'OpacSuppressionMessage', 'SCOMainUserBlock', 'SelfCheckInMainUserBlock', 'SelfCheckHelpMessage', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'PatronSelfRegistrationAdditionalInstructions', 'ILLModuleCopyrightClearance' ] %] [% FOREACH l IN opac_available_options.sort %] [% IF l == location %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss index 04a84b1893..0b247a8a7c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss @@ -552,6 +552,7 @@ .cookieConsentFooter_text, footer .langlabel, .report_a_problem_text, + .accessibility_page_text, .koha_url_text { display: inline; } diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss index cb4a2372d2..efad72505d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss @@ -2938,6 +2938,7 @@ $star-selected: #EDB867; .cookieconsentlabel, .cookieConsentFooter_text, .report_a_problem_text, +.accessibility_page_text, .koha_url_text, .search_history_label { display: none; 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 825846e29a..04e49e1a28 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -4,6 +4,7 @@ [% USE AdditionalContents %] [%- USE KohaPlugins -%] [% USE Asset %] +[% SET OpacAccessibility = AdditionalContents.get( location => "OpacAccessibility", lang => lang, library => logged_in_user.branchcode || default_branch ) %] [% SET opaccredits = AdditionalContents.get( location => "opaccredits", lang => lang, library => logged_in_user.branchcode || default_branch ) %] [% PROCESS 'html_helpers.inc' %] [% IF Koha.Preference( 'CookieConsent' ) %] @@ -46,7 +47,15 @@ Cookies [% END %] + + [% IF ( OpacAccessibility ) %] + + + [% IF OpacAccessibility.content.single.title %][% OpacAccessibility.content.single.title | html %][% ELSE %]Accessibility[% END %] + + [% END %] + [% IF OpacKohaUrl %]