Search Suggestions no longer selectable by mouse click in 3.11+

Bug #2061004 reported by Steve Callender
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Medium
Unassigned

Bug Description

It looks like there was something introduced into 3.11 that broke the search suggestions that come up when entering something into the search box. They are non-selectable with a mouse and the only way to access them is through tabbing/arrowing with the keyboard and pressing "Enter".

Tested on 3.11 and 3.12.

A not-confirmed but possible thing to look at is regression caused by bug https://bugs.launchpad.net/evergreen/+bug/1187993 perhaps.

Changed in evergreen:
status: New → Confirmed
tags: added: accessibility opac opac-autosuggest
Galen Charlton (gmc)
summary: - Search Suggestion no longer working in 3.11+
+ Search Suggestions no longer selectable by mouse click in 3.11+
Changed in evergreen:
importance: Undecided → Medium
tags: added: regression
Revision history for this message
Galen Charlton (gmc) wrote :

Confirmed, this is a regression, though upon examination it looks like it is caused by the patch for bug 2054128.

In particular, when using a mouse click to select a suggestion, it looks like the blur event on the input that closes the dropdown happens first, preempting any click event from getting recognized as applying to the one of the items in the dropdown.

Revision history for this message
Galen Charlton (gmc) wrote :

Looks like using mousedown rather than click on the ul might work around the issue.

However, per https://adamsilver.io/blog/building-an-accessible-autocomplete-control/, a better approach might be to:

- add a keydown handler on the input that closes the dropdown when the user tabs away from the input
- add a document-level click handler that hides the drop-down if the users clicks outside of it
- add something similar for touch events

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.