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

SONARHTML-212 Create rule S6825: Focusable elements should not have "aria-hidden" attribute #285

Conversation

ilia-kebets-sonarsource
Copy link
Contributor

No description provided.

@ericmorand-sonarsource
Copy link
Contributor

One very minor suggestion, but otherwise LGTM.

…accessibility/NoAriaHiddenOnFocusableCheckTest.java

Co-authored-by: Eric Morand <156682586+ericmorand-sonarsource@users.noreply.github.com>
@ilia-kebets-sonarsource ilia-kebets-sonarsource merged commit 985e8ec into master Feb 23, 2024
8 checks passed
@ilia-kebets-sonarsource ilia-kebets-sonarsource deleted the SONARHTML-212-S6825-focusable-elements-no-aria-hidden-attribute branch February 23, 2024 08:01
Comment on lines +50 to +56
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;
}
Copy link

@mshima mshima Feb 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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.

Copy link

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

Copy link
Contributor Author

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.

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

Successfully merging this pull request may close these issues.

5 participants