-
Notifications
You must be signed in to change notification settings - Fork 45
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
Fix S6825: align with React implementation #291
Fix S6825: align with React implementation #291
Conversation
ilia-kebets-sonarsource
commented
Feb 27, 2024
•
edited
Loading
edited
- raised by SONARHTML-212 Create rule S6825: Focusable elements should not have "aria-hidden" attribute #285 (comment)
- SonarJS implementation
|
Looks like we have a few more false positives not related to this one: jhipster/generator-jhipster#26106 (comment). Is there a public repository where we can fill a bug report? |
Hi @mshima, I've been looking at some of the lines that trigger the rule, like this one, and your comment on the mentioned
I feel that the rule should not trigger because, as you say, the element is not focusable. However, I'm also not sure how the rendered HTML page would work with assistive technology: since the close action is not reachable using the keyboard (both because the element is not focusable and because of the I want to ensure that this FP doesn't fortuitously detect a pattern that may impact impaired users negatively. Note that the mentioned line of code should trigger S6848 (Non-interactive DOM elements should not have an interactive handler). |
@ericmorand-sonarsource thanks for the response.
There is a cancel button below, so this other close 'button' is visual only.
Agreed.
That's valid. It's a legacy code, Web:MouseEventWithoutKeyboardEquivalentCheck is a false positive in this case and doesn't justifies adding a keypress event. |