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

[feat] check noninteractive roles on interactive elements #5955

Conversation

anthonylegoas
Copy link
Contributor

@anthonylegoas anthonylegoas commented Feb 3, 2021

Fixes no-interactive-element-to-noninteractive-role of #820

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with npm test and lint the project with npm run lint

@Conduitry
Copy link
Member

Thanks the PR! When I'm looking at the ESLint plugin's implementation (here), though, it looks like there's a bit more going on than is listed in the documentation for this rule. Have you looked at their implementation, and do you think there's anything else we might want to do besides checking for this set of roles on this set of elements?

@anthonylegoas anthonylegoas force-pushed the a11y-no-interactive-element-to-noninteractive-role branch from 03d6670 to 3c0bfb2 Compare February 20, 2021 15:59
@anthonylegoas
Copy link
Contributor Author

anthonylegoas commented Feb 20, 2021

Indeed there are more non-interactive aria-roles than those listed in the documentation.
I pushed another implementation, using aria-query (used in eslint-plugin-jsx-a11y), based on the fact that the interactive roles are the widget roles.
I also ignored the abstract roles.

and do you think there's anything else we might want to do besides checking for this set of roles on this set of elements?

According to the Aria 1.1 specification there are many things we can do about aria-role checks. I'm going to do more PRs.

@anthonylegoas anthonylegoas force-pushed the a11y-no-interactive-element-to-noninteractive-role branch from 3c0bfb2 to d02c6a4 Compare August 2, 2021 14:59
@anthonylegoas anthonylegoas changed the title check noninteractive roles on interactive elements [feat] check noninteractive roles on interactive elements Oct 4, 2021
@anthonylegoas anthonylegoas force-pushed the a11y-no-interactive-element-to-noninteractive-role branch from d02c6a4 to 0b48e01 Compare February 9, 2022 09:30
@tanhauhau tanhauhau force-pushed the a11y-no-interactive-element-to-noninteractive-role branch from 0b48e01 to 5bdc92e Compare July 11, 2022 05:09
@tanhauhau tanhauhau requested a review from geoffrich July 11, 2022 05:19
@tanhauhau tanhauhau force-pushed the a11y-no-interactive-element-to-noninteractive-role branch from 5bdc92e to 8e3b70f Compare July 11, 2022 22:58
@tanhauhau tanhauhau merged commit b517df1 into sveltejs:master Jul 17, 2022
@Conduitry
Copy link
Member

This has been released in 3.50.0. Thank you!

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.

None yet

3 participants