Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a suggestion always highlighted #32

Open
ericbiewener opened this issue Aug 15, 2017 · 2 comments
Open

Make a suggestion always highlighted #32

ericbiewener opened this issue Aug 15, 2017 · 2 comments

Comments

@ericbiewener
Copy link

Previously requested (but then closed by requestor) here. Currently, pressing down on the last item in the list causes no suggestions to be highlighted until another arrow key press. I'd like to be able to have it immediately cycle back to the first one. This could be configurable via a prop.

I'd be happy to submit a PR for this.

@moroshko
Copy link
Owner

This will be against the WAI-ARIA guidelines:

pressing the down arrow when the last choice is highlighted will move focus back to the text box, pressing down again will move focus to the first item in the list.

What's your reasoning to go against the guidelines?

@ericbiewener
Copy link
Author

The guidelines suggest that no item should be highlighted under the case in question because instead it "will move focus back to the text box." However, this is irrelevant given the current functionality of this library since the text input never actually loses focus (or perhaps it's React Autosuggest that is responsible for that functionality). Therefore, being able to un-highlight all suggestions doesn't really seem to serve a purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants