Bug 39706 - Accessibility: Missing text alternative for the star rating.
Summary: Accessibility: Missing text alternative for the star rating.
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Nina Martinez
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 23003
  Show dependency treegraph
 
Reported: 2025-04-23 08:30 UTC by Nina Martinez
Modified: 2025-07-18 12:03 UTC (History)
4 users (show)

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


Attachments
Bug 39706: Add alternative text to the stars rating (7.55 KB, patch)
2025-05-12 10:09 UTC, Nina Martinez
Details | Diff | Splinter Review
Bug 39706: Add alternative text to the stars rating (7.21 KB, patch)
2025-07-10 09:21 UTC, Nina Martinez
Details | Diff | Splinter Review
Bug 39706: Add alternative text to the stars rating (7.31 KB, patch)
2025-07-10 16:54 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 39706: Add alternative text to the stars rating (7.32 KB, patch)
2025-07-15 07:12 UTC, Nina Martinez
Details | Diff | Splinter Review
Bug 39706: Add alternative text to the stars rating (7.42 KB, patch)
2025-07-18 12:03 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nina Martinez 2025-04-23 08:30:04 UTC
After trying to navigate in Koha with a screen reader, I noticed that the star rating of the record was difficult to understand without sight. 
The stars don’t have text alternatives, and the links are empty.

It would be great to improve this!

If you want to test this issue, you can use screen readers like Orca. There are some pages with star ratings:

Enable the following system preference: OpacStarRatings (results, details, and patron).
-The results page (make a search).
-The OPAC details page (choose a record).
-Your summary "checked out" page (You have to make a checkout before for your patron account. Go to the staff interface, enter the card number or your patron name in the search bar, and make a checkout).
Comment 1 Nina Martinez 2025-05-12 10:09:48 UTC Comment hidden (obsolete)
Comment 2 Nina Martinez 2025-07-10 09:21:35 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2025-07-10 16:54:05 UTC Comment hidden (obsolete)
Comment 4 Nina Martinez 2025-07-15 07:12:30 UTC
Created attachment 184070 [details] [review]
Bug 39706: Add alternative text to the stars rating

I just added an exception in the script. Sorry for the inconvenience.

Test Plan:

1- Enable the following system preference: OpacStarRatings (results, details, and patron).
2- Apply the patch.
3- Go to the Opac.
4- Search a record.
5- Inspect the HTML code before the stars and notice that there is "Star rating" in a span tag with the class "sr-only". Inspect the stars, there should be a span tag for each star. After the stars, notice that there is the average rating in a span with the "sr-only" class.
6- Click on a record and do the same as the 5: go to the star rating, inspect the HTML code, and notice that there is a span tag for each star.
7- Now, log into an account.
8- Search a record.
9- It should be the same information as in the step 5.
10- Click on a record to view the details. Now, you can change the rating. Inspect the stars, each should have the number of stars in the span tag with a "sr-only" class, which are in the link tags.
11- For this part, you need to have a record checked out (if you don't have a record checked out, go to the staff interface and do it. Choose your patron and enter the barcode of the record).
12- Go to your account. In the "Checked Out" section, you should see the same as in the 10 step: the number of stars and be able to change your rating or make a new one.
Comment 5 Owen Leonard 2025-07-18 12:03:41 UTC
Created attachment 184355 [details] [review]
Bug 39706: Add alternative text to the stars rating

I just added an exception in the script. Sorry for the inconvenience.

Test Plan:

1- Enable the following system preference: OpacStarRatings (results,
   details, and patron).
2- Apply the patch.
3- Go to the Opac.
4- Search a record.
5- Inspect the HTML code before the stars and notice that there is "Star
   rating" in a span tag with the class "sr-only". Inspect the stars,
   there should be a span tag for each star. After the stars, notice
   that there is the average rating in a span with the "sr-only" class.
6- Click on a record and do the same as the 5: go to the star rating,
   inspect the HTML code, and notice that there is a span tag for each
   star.
7- Now, log into an account.
8- Search a record.
9- It should be the same information as in the step 5.
10- Click on a record to view the details. Now, you can change the
    rating. Inspect the stars, each should have the number of stars in
    the span tag with a "sr-only" class, which are in the link tags.
11- For this part, you need to have a record checked out (if you don't
    have a record checked out, go to the staff interface and do it.
    Choose your patron and enter the barcode of the record).
12- Go to your account. In the "Checked Out" section, you should see the
    same as in the 10 step: the number of stars and be able to change
    your rating or make a new one.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>