Bug 26761

Summary: Use aria-disabled attribute in OPAC cart for disabled links
Product: Koha Reporter: Owen Leonard <oleonard>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Tomás Cohen Arazi <tomascohen>
Severity: enhancement    
Priority: P5 - low CC: tomascohen
Version: Main   
Hardware: All   
OS: All   
URL: https://a11y-101.com/development/aria-disabled
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Bug Depends on:    
Bug Blocks: 8712    
Attachments: Bug 26761: Use aria-disabled attribute in OPAC cart for disabled links
Bug 26761: Use aria-disabled attribute in OPAC cart for disabled links
Bug 26761: Use aria-disabled attribute in OPAC cart for disabled links

Description Owen Leonard 2020-10-21 11:13:24 UTC
There is no "disabled" property for the <a> tag, so we have to have a way in addition to color to express that a link is disabled. I think using the "aria-disabled" attribute would be helpful.
Comment 1 Owen Leonard 2021-07-30 19:21:42 UTC Comment hidden (obsolete)
Comment 2 Lucas Gass 2021-07-30 21:57:42 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi 2021-08-10 18:00:28 UTC
Created attachment 123718 [details] [review]
Bug 26761: Use aria-disabled attribute in OPAC cart for disabled links

This patch adds "aria-disabled" attributes to disabled links in the
Cart, and adds JS to change the value from "true" to "false" when the
links are enabled. The goal is to make the interface more informative to
users of screen readers.

To test, apply the patch and add some items to the Cart in the OPAC.

- Inspect the markup of controls like "Remove", "Place hold," etc. Each
  should look disabled (grey) and has the correct aria-disabled
  attribute value.
- Select one or more checkboxes. The links should be come active, and
  the aria-disabled attribute shoulk now be "false."
- Deselect all checkboxes. The links should now be disabled.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Jonathan Druart 2021-08-16 10:04:34 UTC
Pushed to master for 21.11, thanks to everybody involved!