HSLdevcom / HSLdevcom/digitransit-ui
Allow selecting origin/destination from suggestions by with Tab?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 267
- Forks
- 145
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 75
Description
When I'm typing my origin or destination in the text fields, and I'm provided a list of suggestions, I'd find it intuitive to hit the Tab button when the correct suggestion is focused, and this action would confirm that suggestion as the origin / destination and take my focus to the next UI element. However, hitting the Tab when in the suggestion list only leaves the text field empty and removes the focus. This is what happens in HSL Reittiopas when typing and then trying to select and proceed with Tab:

I've also tested with this https://jyvaskyla.digitransit.fi/, same issue there.
Everything works just as expected when I use Enter instead of Tab, and I think it's fine - Tab completion & focus change just seems to be standard behaviour on many common sites so it feels a bit weird that Reittiopas & Digitransit are missing this UI behaviour. Would it be possible to allow using Tab here?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior in the origin and destination suggestion fields, then trace the frontend keyboard handling for the suggestion list. Done means Tab confirms the focused suggestion and moves focus to the next UI element, while Enter continues to work as before.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- accessibility, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100