DEV Community

Discussion on: Keyboard accessible dropdown in Elm

Collapse
 
stereobooster profile image
stereobooster

👏👏👏 Nicely done. You can handle Home and End keys as well.

Home If the listbox is displayed, moves focus to and selects the first option.
End If the listbox is displayed, moves focus to and selects the last option.

Waiting for the next post

to add the appropriate ARIA attributes and test the dropdown with a screen reader

Collapse
 
margaretkrutikova profile image
Margarita Krutikova

Thank you! 🙂

Absolutely true about Home and End keys, but since they were marked as optional here on keyboard interactions, I decided not to include them to make the article more compact 🙂