Bugzilla – Attachment 123718 Details for
Bug 26761
Use aria-disabled attribute in OPAC cart for disabled links
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26761: Use aria-disabled attribute in OPAC cart for disabled links
Bug-26761-Use-aria-disabled-attribute-in-OPAC-cart.patch (text/plain), 4.33 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-08-10 18:00:28 UTC
(
hide
)
Description:
Bug 26761: Use aria-disabled attribute in OPAC cart for disabled links
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-08-10 18:00:28 UTC
Size:
4.33 KB
patch
obsolete
>From dd3b689e6575dd2fb0666ef7b5ae0eccd43e4947 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 21 Oct 2020 11:15:50 +0000 >Subject: [PATCH] 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> >--- > .../opac-tmpl/bootstrap/en/modules/opac-basket.tt | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >index 5a6eaf8772..3becf590f8 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >@@ -55,16 +55,16 @@ > </div> > <span class="links" id="tag_hides"> > <span class="selections">Select titles to: </span> >- <a href="#" class="btn btn-link btn-sm remove deleteshelf disabled"><i class="fa fa-remove" aria-hidden="true"></i> Remove</a> >+ <a href="#" class="btn btn-link btn-sm remove deleteshelf disabled" aria-disabled="true"><i class="fa fa-remove" aria-hidden="true"></i> Remove</a> > [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %] > [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %] >- <a href="#" class="btn btn-link btn-sm newshelf disabled"><i class="fa fa-fw fa-list" aria-hidden="true"></i> Add to a list</a> >+ <a href="#" class="btn btn-link btn-sm newshelf disabled" aria-disabled="true"><i class="fa fa-fw fa-list" aria-hidden="true"></i> Add to a list</a> > [% END %] > [% IF ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %] >- <a href="#" class="btn btn-link btn-sm hold disabled"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a> >+ <a href="#" class="btn btn-link btn-sm hold disabled" aria-disabled="true"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a> > [% END %] > [% IF ( TagsInputEnabled && loggedinusername ) %] >- <a href="#" id="tagsel_tag" class="btn btn-link btn-sm disabled"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</a> >+ <a href="#" id="tagsel_tag" class="btn btn-link btn-sm disabled" aria-disabled="true"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</a> > [% END %] > [% END # / IF opacuserlogin %] > </span> >@@ -500,10 +500,10 @@ > var checkedBoxes = $(".cb:checked"); > if ( checkedBoxes.length ) { > $(".selections").html(_("With selected titles: ")); >- $(".selections-toolbar .links a").removeClass("disabled"); >+ $(".selections-toolbar .links a").removeClass("disabled").attr("aria-disabled", "false"); > } else { > $(".selections").html(_("Select titles to: ")); >- $(".selections-toolbar .links a").addClass("disabled"); >+ $(".selections-toolbar .links a").addClass("disabled").attr("aria-disabled", "true"); > } > } > </script> >-- >2.32.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26761
:
123344
|
123348
| 123718