-
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
SONARHTML-212 Create rule S6825: Focusable elements should not have "aria-hidden" attribute #285
SONARHTML-212 Create rule S6825: Focusable elements should not have "aria-hidden" attribute #285
Conversation
.../test/java/org/sonar/plugins/html/checks/accessibility/NoAriaHiddenOnFocusableCheckTest.java
Outdated
Show resolved
Hide resolved
One very minor suggestion, but otherwise LGTM. |
…accessibility/NoAriaHiddenOnFocusableCheckTest.java Co-authored-by: Eric Morand <156682586+ericmorand-sonarsource@users.noreply.github.com>
Quality Gate passedIssues Measures |
public static boolean isFocusableElement(TagNode element) { | ||
String tabindex = element.getAttribute("tabindex"); | ||
if (isInteractiveElement(element)) { | ||
return tabindex == null || Double.parseDouble(tabindex) >= 0; | ||
} | ||
return tabindex != null && Double.parseDouble(tabindex) >= 0; | ||
} |
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.
There is a false positive for <input type="hidden"/>
, it should not be focusable.
https://sonarcloud.io/project/issues?impactSoftwareQualities=RELIABILITY&resolved=false&types=CODE_SMELL&id=jhipster-sample-application&open=AY3niTmAHmRkDeY1zyU2
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.
that's been fixed and will appear in the next release.
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.
The next release for VSCode v4.4.2 came out a few days ago but still appears to be an issue
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.
You can track its release in this card.
No description provided.