Bug 33809 - Accessibility: OPAC results page needs more descriptive links
Summary: Accessibility: OPAC results page needs more descriptive links
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Matt Blenkinsop
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-23 14:12 UTC by Matt Blenkinsop
Modified: 2024-02-19 20:36 UTC (History)
6 users (show)

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


Attachments
Bug 33809: Facet "Show more/less" links don't identify what they are showing (5.17 KB, patch)
2023-05-23 14:14 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 33809: Place hold and Add to cart links need better descriptions (4.44 KB, patch)
2023-05-23 14:17 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 33809: Place hold and Add to cart links need better descriptions (4.47 KB, patch)
2023-05-23 14:37 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 33809: Facet "Show more/less" links don't identify what they are showing (5.20 KB, patch)
2023-05-23 21:05 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 33809: Place hold and Add to cart links need better descriptions (4.51 KB, patch)
2023-05-23 21:05 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 33809: (follow-up) Grammar correction (5.19 KB, patch)
2023-06-01 12:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 33809: (follow-up) Grammar correction (5.25 KB, patch)
2023-06-06 15:31 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 33809: Centralize duplicated code (7.67 KB, patch)
2023-07-07 07:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33809: Facet "Show more/less" links don't identify what they are showing (5.26 KB, patch)
2023-10-27 15:30 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 33809: Place hold and Add to cart links need better descriptions (4.57 KB, patch)
2023-10-27 15:31 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 33809: (follow-up) Grammar correction (5.30 KB, patch)
2023-10-27 15:31 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 33809: Centralize duplicated code (7.72 KB, patch)
2023-10-27 15:31 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Blenkinsop 2023-05-23 14:12:29 UTC
A report by the Shaw trust for the British Museum's installation of Koha has identified some links in the OPAC results that are not descriptive enough for screen reader users. Extract below: 

"The text of a link should describe the destination of the link and the link’s purpose. Providing a
descriptive link text will allow users to easily determine the function of the link and make educated
decisions to click the link or not.
If it is not possible to identify the purpose of the link from the link text itself, then this information
should be provided in context.
Screen reader users have the ability to display and navigate by lists of elements, or jump from
element to element. Navigating this way is much quicker than listening to a whole page, however
the context provided by paragraphs and other narrative is lost and non-descriptive links become
harder to understand.
For downloadable links, we recommend that the file type and size of the file is also included in the
link text to allow the user to make a decision whether or not to download the file."

This bug addresses the links identified in the report as needing clearer descriptions.
Comment 1 Matt Blenkinsop 2023-05-23 14:14:50 UTC
Created attachment 151568 [details] [review]
Bug 33809: Facet "Show more/less" links don't identify what they are showing

This patch addresses the Show more/less links in the side menu in opac-facets.inc. The links don't identify which facet they are linked to and this is confusing for screen readers.
Comment 2 Matt Blenkinsop 2023-05-23 14:17:13 UTC Comment hidden (obsolete)
Comment 3 Matt Blenkinsop 2023-05-23 14:37:35 UTC
Created attachment 151576 [details] [review]
Bug 33809: Place hold and Add to cart links need better descriptions

The place hold and add to cart buttons should identify to screen readers which title the button is linked to. This patch adds aria-labels that include the item title to make this more clear
Comment 4 Lucas Gass 2023-05-23 21:05:54 UTC
Created attachment 151606 [details] [review]
Bug 33809: Facet "Show more/less" links don't identify what they are showing

This patch addresses the Show more/less links in the side menu in opac-facets.inc. The links don't identify which facet they are linked to and this is confusing for screen readers.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 5 Lucas Gass 2023-05-23 21:05:57 UTC
Created attachment 151607 [details] [review]
Bug 33809: Place hold and Add to cart links need better descriptions

The place hold and add to cart buttons should identify to screen readers which title the button is linked to. This patch adds aria-labels that include the item title to make this more clear

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 6 Owen Leonard 2023-06-01 12:52:28 UTC
Created attachment 151925 [details] [review]
Bug 33809: (follow-up) Grammar correction

This is somewhat nitpicky but I think "Show fewer..." is more correct
than "Show less..." for strings like "Show fewer authors."

'Generally, fewer is used when the number of things is counted ("fewer
problems") whereas less is used when the number is measured ("less
trouble" or "less time").'
-- https://www.merriam-webster.com/words-at-play/fewer-vs-less

It's not a strict rule but to my ear it sounds more correct. The brief
"Show less" displayed on screen seems fine because the object feels
indeterminate: "Show less information."
Comment 7 Matt Blenkinsop 2023-06-05 14:20:13 UTC
Ahh I originally put "Show fewer..." in those strings but changed it as I thought it might get rejected for consistency with the "Show less" link. Completely agree with "Show fewer...", should've taken the gamble when I uploaded the patch!
Comment 8 Lucas Gass 2023-06-06 15:31:55 UTC
Created attachment 152050 [details] [review]
Bug 33809: (follow-up) Grammar correction

This is somewhat nitpicky but I think "Show fewer..." is more correct
than "Show less..." for strings like "Show fewer authors."

'Generally, fewer is used when the number of things is counted ("fewer
problems") whereas less is used when the number is measured ("less
trouble" or "less time").'
-- https://www.merriam-webster.com/words-at-play/fewer-vs-less

It's not a strict rule but to my ear it sounds more correct. The brief
"Show less" displayed on screen seems fine because the object feels
indeterminate: "Show less information."

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 9 Jonathan Druart 2023-07-07 07:46:10 UTC
Created attachment 153121 [details] [review]
Bug 33809: Centralize duplicated code
Comment 10 Marcel de Rooy 2023-09-15 09:35:56 UTC
I am seeing items.title

Please clarify?
Comment 11 Matt Blenkinsop 2023-09-15 10:49:07 UTC
Do you mean you are seeing it in the label in the OPAC or just seeing it in the code?

I've just checked the patch again and am seeing it correctly in the OPAC. In terms of why it is items (plural) in the code - for each result the title-actions-menu.inc is rendered to produce the action links. It takes a parameter of items and in this case that receives the value of SEARCH_RESULT which is the bib record.

I'm not really sure why "items" is used as the parameter when it appears to be passing a bib record - maybe that's something to change in a new bug?
Comment 12 Kyle M Hall 2023-10-27 15:30:55 UTC
Created attachment 157986 [details] [review]
Bug 33809: Facet "Show more/less" links don't identify what they are showing

This patch addresses the Show more/less links in the side menu in opac-facets.inc. The links don't identify which facet they are linked to and this is confusing for screen readers.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 13 Kyle M Hall 2023-10-27 15:31:01 UTC
Created attachment 157987 [details] [review]
Bug 33809: Place hold and Add to cart links need better descriptions

The place hold and add to cart buttons should identify to screen readers which title the button is linked to. This patch adds aria-labels that include the item title to make this more clear

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 14 Kyle M Hall 2023-10-27 15:31:03 UTC
Created attachment 157988 [details] [review]
Bug 33809: (follow-up) Grammar correction

This is somewhat nitpicky but I think "Show fewer..." is more correct
than "Show less..." for strings like "Show fewer authors."

'Generally, fewer is used when the number of things is counted ("fewer
problems") whereas less is used when the number is measured ("less
trouble" or "less time").'
-- https://www.merriam-webster.com/words-at-play/fewer-vs-less

It's not a strict rule but to my ear it sounds more correct. The brief
"Show less" displayed on screen seems fine because the object feels
indeterminate: "Show less information."

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 15 Kyle M Hall 2023-10-27 15:31:05 UTC
Created attachment 157989 [details] [review]
Bug 33809: Centralize duplicated code

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 16 Tomás Cohen Arazi 2023-10-30 12:03:21 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 17 Fridolin Somers 2023-11-08 08:19:04 UTC
Enhancement not pushed to 23.05.x
Comment 18 Caroline Cyr La Rose 2024-02-19 20:36:46 UTC
I don't think there's anything to add or change in the manual for this.