Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dropdown): improve accessibility keyboard navigation of dropdown
Prior behavior: tabbing would focus the dropdown and open it, subsequent tabs would focus on each item of the list. Instead, the desired behavior is one tab opens the list, only the up and down keys can be used to navigate the list, then the next tab would close list. For this refactor I set the tabIndex to -1 to disable focus on the list items. I also removed the tabIndex from the Container and adjusted the keyHandler toassign focus from the button instead of the container. This was because there was always an extra tab needed to close and leave the dropdown because both the container and button were being traveresed. Since the butten needs the focus--disabling wasn't an option. #210
- Loading branch information