From 118e675bdcc333774913d47f659de188be5153ce Mon Sep 17 00:00:00 2001 From: Alexander Blanchard Date: Thu, 1 May 2025 23:11:37 +0000 Subject: [PATCH] Bug 39502: Web Usability: Decorative Images Do Not Need ALT Text A accessibility audit has highlighted that some of the decorative images on the opac have alt text which is often followed by a spen that also contains the same text. This results in screen readers reading this information twice. The suggested solution is to set the alt text to null in these instances. Test Plan: Prior to applying patch: 1) Navigate to Koha OPAC 2) Carry out a search 3) On one of the records right click on the Material Type: under the heading 4) Select Inspect 5) Note that the image has an alt text that matches the span that follows 6) Click on the item title and repeat the process for the icon below the contributors. 7) Scroll down to the holdings table and repeat the process for the image in the Item Type column 8) Apply the patch 9) Repeat the steps above and notice that the alt is now null in order to ignored by screen readers 11) Note that for the Dev tools may show alt but if you right click on the page and select View Page Source you will see that the code is alt="" as expected by screen readers 12) Note that for alt tags that have been updated in the xsl files e.g. the small icons that follow 'Material Type: ' may be cached. Signed-off-by: Laura_Escamilla Signed-off-by: Emily Lamancusa Signed-off-by: Lucas Gass (cherry picked from commit c5f99a315006084da04d5e6f5fb6de851e3c71be) Signed-off-by: Paul Derscheid (cherry picked from commit 8a6c09f9e38347adc787428ce6f7e98fbebc3b46) Signed-off-by: Baptiste Wojtkowski --- .../tables/items/catalogue_detail.inc | 2 +- .../prog/en/modules/catalogue/advsearch.tt | 2 +- .../prog/en/modules/catalogue/results.tt | 2 +- .../prog/en/modules/virtualshelves/shelves.tt | 2 +- .../en/xslt/MARC21slim2intranetResults.xsl | 22 ++++++------- .../bootstrap/en/modules/opac-advsearch.tt | 2 +- .../bootstrap/en/modules/opac-detail.tt | 2 +- .../bootstrap/en/modules/opac-shelves.tt | 2 +- .../en/xslt/MARC21slim2OPACDetail.xsl | 2 +- .../en/xslt/MARC21slim2OPACResults.xsl | 32 +++++++++---------- 10 files changed, 35 insertions(+), 35 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc index 129fd577cf..ec7061c28d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc @@ -399,7 +399,7 @@ [% UNLESS noItemTypeImages %] let image_location = item_type_image_locations[row.item_type_id]; node += image_location - ? '%s '.format(escape_str(image_location), escape_str(item_type_description), escape_str(item_type_description)) + ? ' '.format(escape_str(image_location), escape_str(item_type_description), escape_str(item_type_description)) : ''; [% END %] node += '%s'.format(escape_str(item_type_description)); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt index 63c52848e7..24ba86871e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt @@ -246,7 +246,7 @@