Bug 41200 - Refocus certain elements on hide or remove
Summary: Refocus certain elements on hide or remove
Status: ASSIGNED
Alias: None
Product: Koha
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Jake Deery
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-06 08:55 UTC by Jake Deery
Modified: 2025-11-06 09:08 UTC (History)
3 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41200: Refocuses add to cart after removal (1.84 KB, patch)
2025-11-06 09:08 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 41200: Refocuses browse results after closure (1.43 KB, patch)
2025-11-06 09:08 UTC, Jake Deery
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-11-06 08:55:10 UTC
On the OPAC, there are a few instances of the browser's focus caret disappearing when an element is removed. This causes problems for people with screen readers, as their reader doesn't know what element should come next in the page's flow any more.

I shall propose a set of patches to resolve this.
Comment 1 Jake Deery 2025-11-06 09:08:37 UTC
Created attachment 189148 [details] [review]
Bug 41200: Refocuses add to cart after removal

This patch hopes to resolve disappearing focus when one clicks 'remove'
on a present card item on the results page, by pushing the focus back to
add to cart when the remove button is selected.

== TO TEST ==
a)  ensure opacbookbag is set to Allow
b)  search for 'history', and add an item to cart via the results page
c)  use the 'remove' button found on the same record row as in steb b)
d)  press tab, and notice how the focus moves somewhere else entirely
== APPLY PATCH ==
e)  repeat steps a-c
f)  notice how this time the focus returns to the nearby add to cart
== SIGN OFF ==
Comment 2 Jake Deery 2025-11-06 09:08:40 UTC
Created attachment 189149 [details] [review]
Bug 41200: Refocuses browse results after closure

This patch resolves to fix missing focus that happens when the close
button is used within the browse results widget on the details page

== TO TEST ==
a)  search for history, and choose any record from the results page
b)  notice the browse results widget on the right - click browse results
c)  click close
d)  try to tab into the next item, notice how the focus caret goes missing
== APPLY PATCH ==
e)  repeat steps a-c
f)  notice how this time the focus returns to browse results
== SIGN OFF ==