From 954e66d935e5a2f580445e1c7c6b66663cb98281 Mon Sep 17 00:00:00 2001
From: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Date: Mon, 8 Mar 2021 23:39:38 +0000
Subject: [PATCH] Bug 27846: clubs, course_reserves, errors and ill folders
Modified breadcrumbs to be accessible, in particular for a
screen-reader.
Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.
To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the clubs, course_reserves, errors and
ill folders has breadcrumbs that are in a <nav aria
label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
belonging to these files look the same as before, but the '>' symbol
is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
page you are currently on
Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
---
.../prog/en/modules/clubs/club-enrollments.tt | 20 ++++++++-
.../prog/en/modules/clubs/clubs-add-modify.tt | 30 +++++++++----
.../prog/en/modules/clubs/clubs.tt | 18 +++++++-
.../en/modules/clubs/templates-add-modify.tt | 30 +++++++++----
.../course_reserves/add_items-step1.tt | 16 ++++++-
.../course_reserves/add_items-step2.tt | 17 +++++++-
.../course_reserves/batch_add_items.tt | 16 ++++++-
.../modules/course_reserves/batch_rm_items.tt | 16 ++++++-
.../modules/course_reserves/course-details.tt | 16 ++++++-
.../course_reserves/course-reserves.tt | 11 ++++-
.../prog/en/modules/course_reserves/course.tt | 16 ++++++-
.../modules/course_reserves/invalid-course.tt | 13 +++++-
.../prog/en/modules/errors/errorpage.tt | 13 +++++-
.../prog/en/modules/ill/ill-requests.tt | 42 +++++++++++++++----
14 files changed, 240 insertions(+), 34 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt
index f6bc52e61d..4f8198b898 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt
@@ -12,7 +12,25 @@
<body id="club_enrollments" class="clubs">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <a href="clubs.pl">Patron clubs</a> › Club enrollments</div>
+
+<nav aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
+ <li>
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+ </li>
+ <li>
+ <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
+ </li>
+ <li>
+ <a href="clubs.pl">Patron clubs</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">
+ Club enrollments
+ </a>
+ </li>
+ </ol>
+</nav>
<div class="main container-fluid">
<div class="row">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt
index cdfd13830a..f3f381720a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt
@@ -17,13 +17,29 @@
<body id="clubs_add_modify" class="clubs">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <a href="clubs.pl">Patron clubs</a> ›
- [% IF club %]
- Modify club <em>[% club.name | html %]</em>
- [% ELSE %]
- Create a new <em>[% club_template.name | html %]</em> club
- [% END %]
-</div>
+
+<nav aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
+ <li>
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+ </li>
+ <li>
+ <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
+ </li>
+ <li>
+ <a href="clubs.pl">Patron clubs</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">
+ [% IF club %]
+ Modify club <em>[% club.name | html %]</em>
+ [% ELSE %]
+ Create a new <em>[% club_template.name | html %]</em> club
+ [% END %]
+ </a>
+ </li>
+ </ol>
+</nav>
<div class="main container-fluid">
<div class="row">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt
index f7db215b35..1574381066 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt
@@ -13,7 +13,23 @@
<body id="clubs_clubs" class="clubs">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › Patron clubs</div>
+
+<div id="breadcrumbs">
+<nav aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
+ <li>
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+ </li>
+ <li>
+ <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">
+ Patron clubs
+ </a>
+ </li>
+ </ol>
+</nav>
<div class="main container-fluid">
<div class="row">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt
index 13aa40c195..3f5934ec13 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt
@@ -21,13 +21,29 @@
<body id="clubs_templates_add_modify" class="clubs">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <a href="clubs.pl">Patron clubs</a> ›
- [% IF club_template %]
- Modify club template <em>[% club_template.name | html %]</em>
- [% ELSE %]
- Create a new club template
- [% END %]
-</div>
+
+<nav aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
+ <li>
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+ </li>
+ <li>
+ <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
+ </li>
+ <li>
+ <a href="clubs.pl">Patron clubs</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">
+ [% IF club_template %]
+ Modify club template <em>[% club_template.name | html %]</em>
+ [% ELSE %]
+ Create a new club template
+ [% END %]
+ </a>
+ </li>
+ </ol>
+</nav>
<div class="main container-fluid">
<div class="row">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt
index 428e293713..c702f8a5ad 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt
@@ -7,7 +7,21 @@
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a> › Add reserves for <em><a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course.course_id | html %]">[% course.course_name | html %]</a></em></div>
+<nav aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
+ <li>
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+ </li>
+ <li>
+ <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">
+ Add reserves for <em>[% course.course_name | html %]</em>
+ </a>
+ </li>
+ </ol>
+</nav>
<div class="main container-fluid">
<div class="row">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt
index 9c12bc05db..a2a6592f68 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt
@@ -10,7 +10,22 @@
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a> ›[% IF is_edit || course_reserve %] Edit [% ELSE %] Reserve [% END %]<em><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | html %]">[% biblio.title | html %]</a></em> for <em><a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course.course_id | html %]">[% course.course_name | html %]</a></em></div>
+<nav aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
+ <li>
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+ </li>
+ <li>
+ <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">
+ [% IF is_edit || course_reserve %] Edit [% ELSE %] Reserve [% END %]
+ <em>[% biblio.title | html %]</em> for <em>[% course.course_name | html %]</em>
+ </a>
+ </li>
+ </ol>
+</nav>
<div class="main container-fluid">
<div class="row">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt
index 1da830054d..b5bfdc99a1 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt
@@ -13,7 +13,21 @@
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a> › Add reserves for <em><a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course.course_id | html %]">[% course.course_name | html %]</a></em></div>
+<nav aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
+ <li>
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+ </li>
+ <li>
+ <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">
+ Add reserves for <em>[% course.course_name | html %]</em>
+ </a>
+ </li>
+ </ol>
+</nav>
<div class="main container-fluid">
<div class="row">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_rm_items.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_rm_items.tt
index d39db41914..a34e7343fc 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_rm_items.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_rm_items.tt
@@ -10,7 +10,21 @@
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a> › Batch remove reserves</div>
+<nav aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
+ <li>
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+ </li>
+ <li>
+ <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">
+ Batch remove reserves
+ </a>
+ </li>
+ </ol>
+</nav>
<div class="main container-fluid">
<div class="row">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt
index aed553c2fb..ca29a2fa26 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt
@@ -24,7 +24,21 @@
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a> › Course details for <em>[% course.course_name | html %]</em></div>
+<nav aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
+ <li>
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+ </li>
+ <li>
+ <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">
+ Course details for <em>[% course.course_name | html %]</em>
+ </a>
+ </li>
+ </ol>
+</nav>
<div class="main container-fluid">
<div class="row">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt
index fe3d7482ec..3b7ceb3cdf 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt
@@ -14,7 +14,16 @@
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a></div>
+<nav aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
+ <li>
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">Course reserves</a>
+ </li>
+ </ol>
+</nav>
<div class="main container-fluid">
<div class="row">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt
index 1f5886fefb..57c76de9bb 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt
@@ -17,7 +17,21 @@
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a> › [% IF course_name %] Edit <em>[% course_name | html %]</em> [% ELSE %] New course [% END %]</div>
+<nav aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
+ <li>
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+ </li>
+ <li>
+ <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">
+ [% IF course_name %] Edit <em>[% course_name | html %]</em> [% ELSE %] New course [% END %]
+ </a>
+ </li>
+ </ol>
+</nav>
[% IF ( departments ) %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/invalid-course.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/invalid-course.tt
index eb12031abf..85b2c0b686 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/invalid-course.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/invalid-course.tt
@@ -6,7 +6,18 @@
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a></div>
+<nav aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
+ <li>
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">
+ Course reserves
+ </a>
+ </li>
+ </ol>
+</nav>
<div class="main container-fluid">
<div class="row">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/errorpage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/errors/errorpage.tt
index 6cd94c19fc..6d69d405bf 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/errorpage.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/errors/errorpage.tt
@@ -7,7 +7,18 @@
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › Error [% errno | html %]</div>
+<nav aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
+ <li>
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">
+ Error [% errno | html %]
+ </a>
+ </li>
+ </ol>
+</nav>
<div class="main container-fluid">
<div class="row">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt
index 1d57e28fa8..18d82d8701 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt
@@ -17,15 +17,39 @@
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs">
- <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
- <a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
- [% IF query_type == 'create' %]
- › New request
- [% ELSIF query_type == 'status' %]
- › Status
- [% END %]
-</div>
+<nav aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
+ <li>
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
+ </li>
+
+ [% IF query_type == 'create' %]
+ <li>
+ <a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">
+ New request
+ </a>
+ </li>
+ [% ELSIF query_type == 'status' %]
+ <li>
+ <a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">
+ Status
+ </a>
+ </li>
+ [% ELSE %]
+ <li>
+ <a href="#" aria-current="page">
+ ILL requests
+ </a>
+ </li>
+ [% END %]
+ </ol>
+</nav>
<div class="main container-fluid">
<div class="row">
--
2.20.1