internetarchive / openlibrary

One webpage for every book ever published!
https://openlibrary.org
GNU Affero General Public License v3.0
5.11k stars 1.33k forks source link

The accessibility of keyboard navigation of the search bar can be improved #7916

Open bick-jp opened 1 year ago

bick-jp commented 1 year ago

(Not sure if I should report this as a bug. If not, I'll repost this with the more appropriate type of issue.) The accessibility of keyboard navigation of the search bar can be improved.

  1. Currently, the auto-suggested list in the search bar is navigated with the tab key. But it should be navigated via arrow keys. And when the tab key is pressed, the focus should move to the next navigation bar item instead of going into the auto-suggested list.

  2. Currently, the auto-suggested list keeps appearing on the screen even after the focus moves out from the search bar. It should disappear when the focus is not on the search bar or on the items of the auto-suggested list.

Evidence / Screenshot (if possible)

When I input the search word, "design" in this case, it automatically shows suggestions. Screen Shot 2023-05-31 at 3 56 58 PM

When I press the tab key, the focus moves to the search icon. Screen Shot 2023-05-31 at 3 57 23 PM

Pressing the tab key again, the focus moves to the barcode-ish icon. Screen Shot 2023-05-31 at 3 57 28 PM

Then, the problem is that pressing the tab key again moves the focus to the suggested list. Screen Shot 2023-05-31 at 3 57 34 PM

After focusing on all the items in the suggested list, the focus finally moves to the next focusable nev bar item, which is the user icon and hamburger menu in this case. Screen Shot 2023-05-31 at 3 57 41 PM

Also, another problem is that the suggested list keeps appearing, even after the focus is off from the search bar (in this case, the focus is on "Books"). Screen Shot 2023-05-31 at 3 58 00 PM

Relevant url?

https://openlibrary.org/search?q=design&mode=printdisabled&has_fulltext=true&subject_facet=Protected+DAISY

Steps to Reproduce

  1. Go to https://openlibrary.org/search?q=design&mode=printdisabled&has_fulltext=true&subject_facet=Protected+DAISY
  2. Input any words in the search bar, and navigate the page with the tab key.

Details

Proposal & Constraints

Search bar keyboard navigation in Google Scholar and GitHub might be good examples.

Related files

Stakeholders

karlitto01 commented 9 months ago

Hi @cdrini. I would like to work on this issue, if possible. Thanks.

RayBB commented 4 months ago

@karlitto01 are you still interested in working on this one?

schu96 commented 3 weeks ago

@RayBB Can you assign me to this issue?

RayBB commented 2 weeks ago

@schu96 you're assigned. Good luck!