-
Notifications
You must be signed in to change notification settings - Fork 55
Replace keyboard binding code with combobox-nav #15
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
Conversation
| const input = this.querySelector('input') | ||
| const results = document.getElementById(owns) | ||
| if (!(input instanceof HTMLInputElement) || !results) return | ||
| input.setAttribute('aria-owns', owns) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
combobox-nav requires aria-owns relationship to be on input & list since it is unaware of the parent element. This copies auto-complete[aria-owns] onto input.
| }) | ||
| e.key = key | ||
| if (key !== key.toLowerCase()) e.shiftKey = true | ||
| if (key.length === 1 && key !== key.toLowerCase()) e.shiftKey = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shiftKey was true on ArrowDown and others but it should not.
So that we won't need to sync up this kind - of fixes.