Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

feat(rome_js_analyze): update noNoninteractiveElementToInteractiveRole and noNoninteractiveTabindex #4439

Merged
merged 5 commits into from
May 6, 2023
Merged

feat(rome_js_analyze): update noNoninteractiveElementToInteractiveRole and noNoninteractiveTabindex #4439

merged 5 commits into from
May 6, 2023

Conversation

unvalley
Copy link
Contributor

@unvalley unvalley commented May 5, 2023

Summary

Closes #3816

  • noNoninteractiveElementToInteractiveRole is already implemented partially
  • This PR enhances the accuracy of the noNoninteractiveElementToInteractiveRole and noNoninteractiveTabindex rules in identifying non-interactive elements and displaying the corresponding diagnostics.
    • but the noNoninteractiveTabindex rule test case has not changed.

Test Plan

cargo test -p rome_js_analyze -- no_noninteractive_element_to_interactive_role

Changelog

  • The PR requires a changelog line

Documentation

  • [ ] The PR requires documentation
  • [ ] I will create a new PR to update the documentation

@netlify
Copy link

netlify bot commented May 5, 2023

Deploy Preview for docs-rometools canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit adc6ac2
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/6455483df1671e0008235063

@unvalley unvalley changed the title feat(rome_js_analyze): update noNoninteractiveElementToInteractiveRole feat(rome_js_analyze): update noNoninteractiveElementToInteractiveRole May 5, 2023
@github-actions github-actions bot added the A-Linter Area: linter label May 5, 2023
@unvalley unvalley changed the title feat(rome_js_analyze): update noNoninteractiveElementToInteractiveRole feat(rome_js_analyze): update noNoninteractiveElementToInteractiveRole and noNoninteractiveTabindex May 5, 2023
@@ -324,7 +324,7 @@ define_role! {
/// https://www.w3.org/TR/wai-aria-1.1/#link
LinkRole {
PROPS: [("aria-expanded", false)],
ROLES: ["command"],
ROLES: ["command", "widget"],
Copy link
Contributor Author

@unvalley unvalley May 5, 2023

Choose a reason for hiding this comment

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

The changes to ROLES in this diff is based on the following link.
https://w3c.github.io/aria/#widget_roles
In order to pass the jsx-a11y test case, it was necessary to refer to this Draft stage document.

@unvalley unvalley marked this pull request as ready for review May 5, 2023 12:11
Copy link
Contributor

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Amazing contribution!! Thank you! 🙏

@ematipico ematipico merged commit 174a9be into rome:main May 6, 2023
16 checks passed
@unvalley unvalley deleted the update-no-noninteractive-element-to-interactive-role branch May 6, 2023 10:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Linter Area: linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

noNoninteractiveElementToInteractiveRole
2 participants