Bugzilla – Attachment 184727 Details for
Bug 34556
Add a template 'Accessibility statement' page to the default data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34556: Add an Accessibility Statement Page
Bug-34556-Add-an-Accessibility-Statement-Page.patch (text/plain), 12.59 KB, created by
Nina Martinez
on 2025-07-28 08:50:02 UTC
(
hide
)
Description:
Bug 34556: Add an Accessibility Statement Page
Filename:
MIME Type:
Creator:
Nina Martinez
Created:
2025-07-28 08:50:02 UTC
Size:
12.59 KB
patch
obsolete
>From e08aa00417f5a008f3f53acf9dfd1389a5733d4e Mon Sep 17 00:00:00 2001 >From: nina martinez <nina.martinez@biblibre.com> >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 @@ > > <div id="StaffReportsHome_notes" class="hint customization_note"> Include this content in its own section on the reports home page</div> > >+<div id="OpacAccessibility" class="hint customization_note"> Show this content in the Accessibility page in the OPAC. </div> >+ > <div id="opaccredits_notes" class="hint customization_note"> Include this content in the footer of all pages in the OPAC. </div> > > <div id="OpacCustomSearch_notes" class="hint customization_note"> Replace the search box at the top of OPAC pages with this content. </div> >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' ] %] > <optgroup label="OPAC"> > [% 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 @@ > <span class="cookieConsentFooter_text">Cookies</span> > </a> > [% END %] >+ >+ [% IF ( OpacAccessibility ) %] >+ <a id="accessibility_page" class="nav-link" href="/cgi-bin/koha/opac-accessibility.pl"> >+ <i class="fa fa-universal-access fa-fw fa-icon-footer" aria-hidden="true"></i> >+ <span class="accessibility_page_text"> [% IF OpacAccessibility.content.single.title %][% OpacAccessibility.content.single.title | html %][% ELSE %]Accessibility[% END %]</span> >+ </a> >+ [% END %] > </div> >+ > [% IF OpacKohaUrl %] > <div class="navbar-nav"> > <a id="koha_url" class="nav-link koha_url" href="https://koha-community.org"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-accessibility.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-accessibility.tt >new file mode 100644 >index 0000000000..99162a9fdb >--- /dev/null >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-accessibility.tt >@@ -0,0 +1,59 @@ >+[% USE raw %] >+[% USE AdditionalContents %] >+[% SET OpacAccessibility = AdditionalContents.get( location => "OpacAccessibility", lang => lang, library => logged_in_user.branchcode || default_branch , blocktitle => 0) %] >+[% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] >+[% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] >+[% INCLUDE 'doc-head-open.inc' %] >+ >+<title> >+ [% IF OpacAccessibility.content.single.title %] >+ [% OpacAccessibility.content.single.title | html %] >+ [% ELSE %] >+ Accessibility >+ [% END %] >+</title> >+[% INCLUDE 'doc-head-close.inc' %] >+[% BLOCK cssinclude %] >+[% END %] >+</head> >+[% INCLUDE 'bodytag.inc' bodyid='opac-accessibility' %] >+[% INCLUDE 'masthead.inc' %] >+ >+<main class="main"> >+ [% WRAPPER breadcrumbs %] >+ [% WRAPPER breadcrumb_item bc_active= 1 %] >+ <span> >+ [% IF OpacAccessibility.content.single.title %] >+ [% OpacAccessibility.content.single.title | html %] >+ [% ELSE %] >+ Accessibility >+ [% END %] >+ </span> >+ [% END %] >+ [% END #/ WRAPPER breadcrumbs %] >+ >+ <div class="container-fluid"> >+ <div class="row"> >+ [% SET div_class = 'col-10 order-first order-md-first order-lg-2' %] >+ [% IF ( OpacNav || OpacNavBottom ) %] >+ <div class="col-lg-2"> >+ <div id="navigation"> [% INCLUDE 'navigation.inc' %] </div> >+ </div> >+ [% ELSE %] >+ [% SET div_class = 'col order-first order-md-first order-lg-2' %] >+ [% END %] >+ <div class="[% div_class | html %]"> >+ [% IF ( OpacAccessibility ) %] >+ [% PROCESS koha_news_block news => OpacAccessibility %] >+ [% END %] >+ </div> >+ <!-- /.row --> >+ </div> >+ <!-- /.container-fluid --> >+ </div> >+ <!-- /.main --> >+</main> >+ >+[% INCLUDE 'opac-bottom.inc' %] >+[% BLOCK jsinclude %] >+[% END %] >diff --git a/opac/opac-accessibility.pl b/opac/opac-accessibility.pl >new file mode 100755 >index 0000000000..0a14365be1 >--- /dev/null >+++ b/opac/opac-accessibility.pl >@@ -0,0 +1,38 @@ >+#!/usr/bin/perl >+ >+# This file is part of Koha. >+# >+# Parts Copyright (C) 2013 Mark Tompsett >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+ >+use CGI qw ( -utf8 ); >+use C4::Auth qw( get_template_and_user ); >+use C4::Output qw( output_html_with_http_headers ); >+ >+my $input = CGI->new; >+ >+my ( $template, $cookie ) = get_template_and_user( >+ { >+ template_name => "opac-accessibility.tt", >+ type => "opac", >+ query => $input, >+ authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ), >+ } >+); >+ >+output_html_with_http_headers $input, $cookie, $template->output; >+ >-- >2.43.0
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 34556
:
180474
|
180492
|
180627
| 184727