Bug 28142 - Accessibility: OPAC Cart/basket checkboxes are not labelled
Summary: Accessibility: OPAC Cart/basket checkboxes are not labelled
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Henry Bolshaw
QA Contact: Testopia
URL:
Keywords: Academy, accessibility
Depends on:
Blocks:
 
Reported: 2021-04-13 12:15 UTC by Henry Bolshaw
Modified: 2022-06-06 20:25 UTC (History)
2 users (show)

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


Attachments
Bug 28142: Accessibility: OPAC cart/basket checkboxes are not labelled (3.43 KB, patch)
2021-07-15 22:53 UTC, Henry Bolshaw
Details | Diff | Splinter Review
Bug 28142: Accessibility: OPAC cart/basket checkboxes are not labelled (3.48 KB, patch)
2021-07-16 12:07 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28142: Accessibility: OPAC cart/basket checkboxes are not labelled (3.53 KB, patch)
2021-08-03 13:08 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Bolshaw 2021-04-13 12:15:06 UTC
The checkboxes on the OPAC cart ("Basket") pages are not labelled. this makes it hard for users of screen readers to determine their purpose. This applies to both the brief and verbose displays.

e.g. the checkbox appears in NVDA as:

"Unlabeled; check box; not selected"

We should add distinct labels so that users can identify the purpose of the checkboxes without visual context.

The labels should include the title of the item so that users can decide which items to select from a list e.g. "Select [Title]" rather than "Select item".

From what I've read it is better to use <label> with the .sr-only class rather than using aria-label.
Comment 1 Henry Bolshaw 2021-07-15 22:53:17 UTC
Created attachment 122863 [details] [review]
Bug 28142: Accessibility: OPAC cart/basket checkboxes are not labelled

This patch adds labels to the checkboxes on the "Your cart" page to
improve accessibility for users of screen readers. The labels are
hidden from display because the item titles provide enough visual
context.

Test Plan:

1. Go to the OPAC
2. Search for some items and add them to your cart
3. Inspect the page html and confirm the checkboxes are not labelled
4. Select the "More Details" page and confirm these labels are missing too
5. Apply the patch
6. Inspect the checkboxes on the "Brief display" and "more details" views
7. Confirm that the checkboxes have meaningful labels and that the visual
display of the pages has not changed.
Comment 2 Owen Leonard 2021-07-16 12:07:58 UTC
Created attachment 122885 [details] [review]
Bug 28142: Accessibility: OPAC cart/basket checkboxes are not labelled

This patch adds labels to the checkboxes on the "Your cart" page to
improve accessibility for users of screen readers. The labels are
hidden from display because the item titles provide enough visual
context.

Test Plan:

1. Go to the OPAC
2. Search for some items and add them to your cart
3. Inspect the page html and confirm the checkboxes are not labelled
4. Select the "More Details" page and confirm these labels are missing too
5. Apply the patch
6. Inspect the checkboxes on the "Brief display" and "more details" views
7. Confirm that the checkboxes have meaningful labels and that the visual
display of the pages has not changed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Nick Clemens (kidclamp) 2021-08-03 13:08:29 UTC
Created attachment 123421 [details] [review]
Bug 28142: Accessibility: OPAC cart/basket checkboxes are not labelled

This patch adds labels to the checkboxes on the "Your cart" page to
improve accessibility for users of screen readers. The labels are
hidden from display because the item titles provide enough visual
context.

Test Plan:

1. Go to the OPAC
2. Search for some items and add them to your cart
3. Inspect the page html and confirm the checkboxes are not labelled
4. Select the "More Details" page and confirm these labels are missing too
5. Apply the patch
6. Inspect the checkboxes on the "Brief display" and "more details" views
7. Confirm that the checkboxes have meaningful labels and that the visual
display of the pages has not changed.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Jonathan Druart 2021-08-04 12:05:56 UTC
Pushed to master for 21.11, thanks to everybody involved!