-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Visible, non-interactive elements with click handlers must have at least one keyboard listener #827
Comments
hey @derberg I would like to work on this issue, I think i'll be comfortable with this as a MERN Developer |
@harshit-senpai sure, go ahead and try. First propose the solution and then open a PR |
sure @derberg Here is the proposed solution : Based on the information provided, and here is how I would address the issue: The issue is occurring on the This fails accessibility best practices because it provides a click interaction but no keyboard alternative, preventing users who rely on keyboard navigation from using this element. To fix it, we need to add at least one keyboard event handler to support keyboard accessibility, for example:
By adding Let me know if this was the kind of solution that you were hoping for. |
This issue has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
Affected accessibility because of below code from
Sidebar.tsx
more details: https://sonarcloud.io/project/issues?pullRequest=744&open=AYtrMfuPCKuSkLgXi7U7&id=asyncapi_asyncapi-react
Offering the same experience with the mouse and the keyboard allow users to pick their preferred devices.
Additionally, users of assistive technology will also be able to browse the site even if they cannot use the mouse.
This rules detects the following issues:
when onClick is not accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress.
when onmouseover/onmouseout are not paired by onfocus/onblur.
Possible solution
<div onClick={() => {}} onKeyDown={this.handleKeyDown} />
=><div onMouseOver={ () => {} } onFocus={ () => {} } />
The text was updated successfully, but these errors were encountered: