Bug 26761 - Use aria-disabled attribute in OPAC cart for disabled links
Summary: Use aria-disabled attribute in OPAC cart for disabled links
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Tomás Cohen Arazi (tcohen)
URL: https://a11y-101.com/development/aria...
Keywords:
Depends on:
Blocks: 8712
  Show dependency treegraph
 
Reported: 2020-10-21 11:13 UTC by Owen Leonard
Modified: 2022-12-12 21:24 UTC (History)
1 user (show)

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


Attachments
Bug 26761: Use aria-disabled attribute in OPAC cart for disabled links (4.22 KB, patch)
2021-07-30 19:21 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26761: Use aria-disabled attribute in OPAC cart for disabled links (4.28 KB, patch)
2021-07-30 21:57 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 26761: Use aria-disabled attribute in OPAC cart for disabled links (4.33 KB, patch)
2021-08-10 18:00 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 (lukeg) 2021-07-30 21:57:42 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi (tcohen) 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!