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.
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.
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>
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>
Pushed to master for 21.11, thanks to everybody involved!