Allow using Tab key to cycle through typeahead entries
Basics
Technical
Logistics
Basics
Technical
Logistics
Description
Given the autocomplete nature of the typeahead field (and me being a developer), I was expecting to have the ability to hit Tab to select the first entry in the results, and then have it cycle through the results when repeatedly hitting tab.
This patch allows the use of the tab key and shift-tab keys to cycle forward and backwards through the list of typeahead entries. Pressing tab repeatedly will cycle down the list, pressing shift-tab will cycle upwards through the list, and the cycle wraps around if at the top or bottom respectively.
Existing behaviour is unaffected. The code for mimicing a selection has been refactored into its own function, and the keydown function now looks for the tab key to be pressed.
Environment
None
Attachments
1
typeahead-tab-select.patch
18 May, 2015
Activity
Rod Widdowson
June 9, 2025 at 6:03 PM
I have applied and pushed the patch. I have an open question about accessibility and when that is answered I’ll resolve this appropriately
Rod Widdowson
May 6, 2016 at 9:06 AM
marking as "for consideration" in 1.2, but I rather fear that time constraints may defeat me
David Beitey
May 19, 2015 at 12:30 AM
(edited)
Sure, no problem. My current deployment for the EDS is going to use the drop-down list as default; consistency with the existing embedded WAYF from our DS that we've been using; but having this down the road would be super.
Rod Widdowson
May 18, 2015 at 10:15 AM
Thanks for the patch,
I'll review it because tab following is something I care about. However there is a lot of aria support in this release and I don't want to screw that up so there is a chance that I may hold the patch for now. Our Aria testers have gone quiet....
Given the autocomplete nature of the typeahead field (and me being a developer), I was expecting to have the ability to hit Tab to select the first entry in the results, and then have it cycle through the results when repeatedly hitting tab.
This patch allows the use of the tab key and shift-tab keys to cycle forward and backwards through the list of typeahead entries. Pressing tab repeatedly will cycle down the list, pressing shift-tab will cycle upwards through the list, and the cycle wraps around if at the top or bottom respectively.
Existing behaviour is unaffected. The code for mimicing a selection has been refactored into its own function, and the keydown function now looks for the tab key to be pressed.