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

Event is not generated in DOM once the dropdown is open and first element is highlighted #7334

Closed
tlvenkat457 opened this issue Jun 28, 2017 · 2 comments

Comments

@tlvenkat457
Copy link

tlvenkat457 commented Jun 28, 2017

Configuration: Windows10, Firefox

Actual issue is the first item in dropdown is not auto focused on clicking space or return keys. After debugging, I found that keydown event is not generated instead seeing a click event, so my keydown event handler is not being invoked. I have added the code snippet in https://pastebin.com/ZKt231Xp
The above work around fixed the issue of highlighting the first element in dropdown but also introduced a new issue, Now I have to press the ESC key twice to close the dropdown. After debugging I came to know that on first ESC key press no event is generated inside DOM and hence my escape key event handler is not being triggered. Escape handler is something like a dropdown toggle and calling element.click(); in the angular directive

@jcsteh
Copy link
Contributor

jcsteh commented Jun 29, 2017

When in browse mode, enter and space click the element under the cursor, rather than sending a key press. This is because we need to be able to click non-focusable elements and, even for focusable elements, we can't be certain they support key presses. This is not the case in focus mode.

When in focus mode, pressing escape returns to browse mode. However, it really shouldn't do this for ARIA menus; that's an NVDA bug (#3215). To clarify, do your dropdown items have a role of menuitem or something else?

@jcsteh
Copy link
Contributor

jcsteh commented Jun 29, 2017

Closing as a duplicate of #3215, but please do answer my question here regarding the role of your dropdown items. Thanks.

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

No branches or pull requests

2 participants