From 402bfd04085c591765241827a66bc8aa4a6fa7ac Mon Sep 17 00:00:00 2001 From: Chloe Zermatten Date: Tue, 1 Apr 2025 14:05:13 +0000 Subject: [PATCH] Bug 39489: 'Refine your search' aria-expanded attribute On smaller screens (phones, tablets), the 'Refine your search' expandable section in the Koha OPAC is not clearly announced by screen readers. The reason for this is that the expandable section toggle button is instead identified and announced as a link. This results in screen reader users incorrectly expecting to be redirected to another page, and not being informed that there is a expandable section. For elements with a class of menu-collapse-toggle, add an aria-expanded attribute which defaults to false, and is toggled to true upon the section being expanded. To test: 1) Apply the patch. 2) Run a library catalogue search in the Koha OPAC. 3) Right click on the page to inspect it. 4) Inspect the 'Refine your search' element. 5) Notice that it now has a aria-expanded attribute which is set to false. 6) Open the expandable 'Refine your search' section. 7) Notice that the aria-expanded attribute on the 'Refinine your search' element is now set to true. 8) Navigate to Home > Most popular titles 9) Repeat steps 3-7 10) Navigate to Home > Details for > Full subscription history 11) Repeat steps 3-7 Signed-off-by: Brendan Gallagher --- koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc | 2 +- .../opac-tmpl/bootstrap/en/includes/opac-topissues.inc | 2 +- .../bootstrap/en/modules/opac-full-serial-issues.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/js/global.js | 6 ++++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc index 180eee8561..e56965d663 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc @@ -6,7 +6,7 @@ [% SET OPACResultsSidebar = AdditionalContents.get( location => "OPACResultsSidebar", lang => lang, library => logged_in_user.branchcode || default_branch ) %] [% IF ( opacfacets && facets_loop && total ) %]
-

Refine your search

+