Bug 40780

Summary: Removing rows on advanced search should not lose focus
Product: Koha Reporter: Jake Deery <jake.deery>
Component: OPACAssignee: Jake Deery <jake.deery>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: jake.deery
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 40780: Advsearch ButtonMinus moves focus to next or prev line

Description Jake Deery 2025-09-10 08:55:29 UTC
When removing search fields on the advanced search page of the OPAC, focus is lost. This shouldn't happen; focus should move to a sane location instead.
Comment 1 Jake Deery 2025-09-10 08:56:46 UTC
Created attachment 186309 [details] [review]
Bug 40780: Advsearch ButtonMinus moves focus to next or prev line

This patch will cause the ButtonMinus button on each of the advsearch
fieldsets to jump the focus to the next or previous line, whichever is
available. This is in response to a recent accessibility audit performed
by one of our customers. Thanks!

TO TEST:
a)  go to /cgi-bin/koha/opac-search.pl?expanded_options=1
b)  click / tab onto the ButtonMinus next to a field, click / press
enter
c)  notice how the focus disappears
APPLY PATCH
d)  repeat steps a-b
e)  notice how the focus now either goes to the next line (if available)
or the previous line (otherwise)
SIGN OFF