Bug 40782 - Selections toolbar buttons should not be focusable when they are inactive
Summary: Selections toolbar buttons should not be focusable when they are inactive
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Jake Deery
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-10 09:08 UTC by Jake Deery
Modified: 2025-09-10 16:20 UTC (History)
1 user (show)

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


Attachments
Bug 40782: Selections toolbar checkbox now adds tabindex -1 (1.39 KB, patch)
2025-09-10 09:09 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 40782: Selections toolbar checkbox now adds tabindex -1 (1.45 KB, patch)
2025-09-10 11:11 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 40782: (follow-up) Tidy results-list.js (1.17 KB, patch)
2025-09-10 11:11 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jake Deery 2025-09-10 09:08:17 UTC
On the results page, some toolbar buttons have a disabled class, but can still be focused. This should not be possible, as it is misleading for users of a screen reader.
Comment 1 Jake Deery 2025-09-10 09:09:50 UTC
Created attachment 186310 [details] [review]
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
Comment 2 Owen Leonard 2025-09-10 11:11:42 UTC
Created attachment 186318 [details] [review]
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 <oleonard@myacpl.org>
Comment 3 Owen Leonard 2025-09-10 11:11:45 UTC
Created attachment 186319 [details] [review]
Bug 40782: (follow-up) Tidy results-list.js

Tidy converts single quotes to double quotes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>