From 916b2aa81ca31494a1a245aafc04d2b2f4d23790 Mon Sep 17 00:00:00 2001 From: Jake Deery Date: Tue, 9 Sep 2025 11:30:56 +0000 Subject: [PATCH] Bug 40782: Selections toolbar checkbox now adds tabindex -1 This patch now sets tabindex to -1 if a disabled class is applied to a control, and removes it when the class evaporates. This improves accessibility by making these disabled items non-focusable. To test: a) make a search on the OPAC b) tab through the selections toolbar, notice how visually disabled items are focusable APPLY PATCH c) repeat steps a-b, notice how the elements are no longer focusable SIGN OFF Signed-off-by: Owen Leonard Bug 40782: (follow-up) Tidy results-list.js Tidy converts single quotes to double quotes Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart --- koha-tmpl/opac-tmpl/bootstrap/js/results-list.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/results-list.js b/koha-tmpl/opac-tmpl/bootstrap/js/results-list.js index e3b2b4b83cd..cb1889207a7 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/results-list.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/results-list.js @@ -34,9 +34,11 @@ function enableCheckboxActions() { if ($(checkedBoxes).size()) { $(".selections").html(__("With selected titles: ")); $(controls).removeClass("disabled"); + $(controls).removeAttr("tabindex"); } else { $(".selections").html(__("Select titles to: ")); $(controls).addClass("disabled"); + $(controls).attr("tabindex", "-1"); } } -- 2.34.1