We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently if you have code like this:
<div role="dialog" onKeyPress={handleEscKey}>{contents}</div>
The rule no-noninteractive-element-interactions will fail. However, closing a dialog with the Esc is a common pattern also suggested by the WAI-ARIA practices site: https://www.w3.org/TR/wai-aria-practices-1.2/examples/dialog-modal/datepicker-dialog.html (the linked example has a keyDown handler in the div with the dialog role).
no-noninteractive-element-interactions
Esc
div
dialog
The lint rule passes with role="presentation" which is incorrect for this case.
role="presentation"
The text was updated successfully, but these errors were encountered:
I'm closing this issue.
If the "dialog" contains any interactive elements the work around of moving the handler down will work.
I prefer to use bubbling to handle this, but also I'm not so happy about having a onKeyPress handler in an non-focusable element.
onKeyPress
Sorry, something went wrong.
No branches or pull requests
Currently if you have code like this:
The rule
no-noninteractive-element-interactions
will fail. However, closing a dialog with theEsc
is a common pattern also suggested by the WAI-ARIA practices site: https://www.w3.org/TR/wai-aria-practices-1.2/examples/dialog-modal/datepicker-dialog.html (the linked example has a keyDown handler in thediv
with thedialog
role).The lint rule passes with
role="presentation"
which is incorrect for this case.The text was updated successfully, but these errors were encountered: