Bug 39502 - Web Usability Accessibility Audit - Decorative Images Don't Need alt Text
Summary: Web Usability Accessibility Audit - Decorative Images Don't Need alt Text
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Alexander Blanchard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-31 14:34 UTC by Alexander Blanchard
Modified: 2025-05-16 17:14 UTC (History)
4 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 39502: Web Usability: Decorative Images Do Not Need ALT Text (21.27 KB, patch)
2025-05-01 23:28 UTC, Alexander Blanchard
Details | Diff | Splinter Review
Bug 39502: Web Usability: Decorative Images Do Not Need ALT Text (22.10 KB, patch)
2025-05-16 17:13 UTC, Alexander Blanchard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Blanchard 2025-03-31 14:34:30 UTC
The accessibility audit has highlighted that there are icons across the site that are used to define the different types of content available in the library catalogue. Often these icons are used alongside text that also describes the content types available. Where this is the case, a screen reader user hears the same content twice. 

Some decorative images are also announced by their file name. The report has highlighted that for screen readers, these names are often too long and confusing.

These findings may impact the experience of screen reader users. 

The suggested solution is for purely decorative images to have null alt text.
Comment 1 Alexander Blanchard 2025-05-01 23:28:03 UTC
Created attachment 181843 [details] [review]
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) Log in as a user with at least one checkout
9) Navigate to the Checkout History table and repeat the process for the icon in the itype column
10) Apply the patch
11) Repeat the steps above and notice that the alt is now null in order to ignored by screen readers
12) 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
13) 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.
Comment 2 Lin Wei 2025-05-09 20:23:53 UTC
# Test Environment

- OS: Ubuntu 24.04.2 LTS
- Browser: Firefox 138.0.1 (64-bit)

# Issues with Test Plan

- Step 6: Skipped this step: instruction unclear.

# Results before Applying Patch

- Step 5: Expected behavior: the image has an alt text equal to the span after it.
- Step 6: Expected behavior: the image has an alt text equal to the span after it.
- Step 7: Expected behavior: the image has an alt text equal to the span after it.
- Step 9: Unexpected behavior: the checkout history of my account has an entry with "Item type: Books" where the image already has an empty alt text.

# Results after Applying Patch

- Step 5: Expected behavior: the image has no alt text.
- Step 6: Unexpected behavior: the image still has an alt text.
- Step 7: Expected behavior: the image has no alt text.
- Step 9: Expected behavior: the image has no alt text.
Comment 3 Lin Wei 2025-05-09 21:06:37 UTC
(In reply to Lin Wei from comment #2)
> # Issues with Test Plan
> 
> - Step 6: Skipped this step: instruction unclear.

Please disregard this section: my system was not set up properly in the beginning.
Comment 4 Alexander Blanchard 2025-05-16 17:13:13 UTC
Created attachment 182548 [details] [review]
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.
Comment 5 Alexander Blanchard 2025-05-16 17:14:06 UTC
Updated the patch to account for the unexpected behaviour in step 6.