Bug 28142 - Accessibility: OPAC Cart/basket checkboxes are not labelled
Summary: Accessibility: OPAC Cart/basket checkboxes are not labelled
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Henry Bolshaw
QA Contact: Testopia
URL:
Keywords: Academy, accessibility
Depends on:
Blocks:
 
Reported: 2021-04-13 12:15 UTC by Henry Bolshaw
Modified: 2021-08-04 12:05 UTC (History)
1 user (show)

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


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
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 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!