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

role="menu" incorrectly marked as rendundant and no-interactive-to-interactive when used on menu element #8529

Open
raythurnvoid opened this issue Apr 23, 2023 · 2 comments
Labels

Comments

@raythurnvoid
Copy link

Describe the bug

image

Has per MDN docs the menu element is like the ul element but more semantically correct for interactive content, and the implicit role is list not menu.

Reproduction URL

N/A

Reproduction

No response

Logs

No response

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (16) x64 AMD Ryzen 9 4900H with Radeon Graphics
    Memory: 16.49 GB / 31.42 GB
  Binaries:
    Node: 18.14.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.3.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.1555.0), Chromium (112.0.1722.58)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    @sveltejs/adapter-static: ^2.0.1 => 2.0.2 
    @sveltejs/kit: ^1.15.2 => 1.15.5 
    svelte: ^3.58.0 => 3.58.0 
    vite: ^4.2.1 => 4.2.1
@bluwy bluwy transferred this issue from sveltejs/vite-plugin-svelte Apr 23, 2023
@ngtr6788
Copy link
Contributor

ngtr6788 commented Apr 26, 2023

I tried testing similar markup in React JSX instead of Svelte + jsx-eslint (which Svelte's a11y checks are based on), and this is what I see
image
You are correct for seeing that menu's implicit role is list. As for the no-noninteractive-element-to-interactive-role, I'm not too sure what to do, because the statement seems a bit contradictory, doesn't it? Maybe we could ask jsx-eslint?

@raythurnvoid
Copy link
Author

raythurnvoid commented Apr 26, 2023

I tried testing similar markup in React JSX instead of Svelte + jsx-eslint (which Svelte's a11y checks are based on), and this is what I see image You are correct for seeing that menu's implicit role is list. As for the no-noninteractive-element-to-interactive-role, I'm not too sure what to do, because the statement seems a bit contradictory, doesn't it? Maybe we could ask jsx-eslint?

yeah, I'm not very familiar with it but as a general thought I think that as long as a role is marked as "permitted" on MDN, I don't see why eslint should tell me not to use it and MDN doesn't distinguish between interactive and non-interactive roles.

dummdidumm pushed a commit that referenced this issue Apr 26, 2023
Deals with the no-redundant-roles part of #8529

There was an erroneous check which compares the element name with the current role. This fix brings no-redundant-roles closer to the original eslint-jsx implementation
@dummdidumm dummdidumm removed the triage label Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants