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

Allow menuitemradio and menuitemcheckbox on <li> #950

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

khiga8
Copy link
Contributor

@khiga8 khiga8 commented Aug 28, 2023

Fixes: #896

Currently, the jsx-a11y/no-noninteractive-element-to-interactive-role rule flags <li role="menuitemradio"> and <li role="menuitemcheckbox">. I don't think these should be flagged, especially given we allow <li role="menuitem">.

Conflicting recommendations:

@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.02%. Comparing base (0d5321a) to head (ec87ead).

❗ Current head ec87ead differs from pull request most recent head 9b66688. Consider uploading reports for the commit 9b66688 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #950   +/-   ##
=======================================
  Coverage   99.02%   99.02%           
=======================================
  Files         105      105           
  Lines        1636     1642    +6     
  Branches      579      578    -1     
=======================================
+ Hits         1620     1626    +6     
  Misses         16       16           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ljharb ljharb requested a review from jessebeach August 28, 2023 18:54
Copy link
Collaborator

@jessebeach jessebeach left a comment

Choose a reason for hiding this comment

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

Thank you @khiga8 !

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

This needs some tests.

@ljharb ljharb marked this pull request as draft October 30, 2023 19:29
Comment on lines +460 to +461
{ code: '<li role="menuitemcheckbox" />;' },
{ code: '<li role="menuitemradio" />;' },
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added the requested test!

@khiga8 khiga8 marked this pull request as ready for review May 6, 2024 16:59
@khiga8 khiga8 requested a review from ljharb May 6, 2024 16:59
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.

jsx-a11y/no-noninteractive-element-to-interactive-role should support menuitemcheckbox by default
3 participants