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

Lint error using onClick on a div #2756

Closed
3 tasks done
chronark opened this issue Dec 17, 2024 · 3 comments · Fixed by #2778
Closed
3 tasks done

Lint error using onClick on a div #2756

chronark opened this issue Dec 17, 2024 · 3 comments · Fixed by #2778
Assignees
Labels
Bug Something isn't working

Comments

@chronark
Copy link
Collaborator

Preliminary Checks

Reproduction / Replay Link (Optional)

No response

Issue Summary

Formatted 1273 files in 136ms. Fixed 23 files.
./apps/dashboard/app/(app)/audit/[bucket]/filter.tsx:74:19 lint/a11y/useKeyWithClickEvents ━━━━━━━━━━

  ✖ Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.

    72 │                 const isSelected = selected.includes(option.value);
    73 │                 return (
  > 74 │                   <div
       │                   ^^^^
  > 75 │                     onClick={() => {
        ...
  > 80 │                     }}
  > 81 │                   >
       │                   ^
    82 │                     <CommandItem
    83 │                       key={option.value}

  ℹ Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.

Steps to Reproduce

pnpm fmt

Expected behavior

we should use a button I think

Other information

No response

Screenshots

No response

Version info

- OS:
- Node:
- npm:
@chronark chronark added Bug Something isn't working Needs Approval Needs approval from Unkey labels Dec 17, 2024
Copy link

linear bot commented Dec 17, 2024

@chronark chronark removed the Needs Approval Needs approval from Unkey label Dec 17, 2024
@FurquanAnwer
Copy link

Please assign this to me !

@ogzhanolguncu
Copy link
Contributor

All yours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
3 participants