From 990f90ebd3bacb345b465e7ff8970776f334d7ff 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 --- 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..3c6e5808cd5 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.43.0