fix: warn on click handlers for table row and cell elements#17990
fix: warn on click handlers for table row and cell elements#17990RazinShafayet2007 wants to merge 3 commits into
Conversation
🦋 Changeset detectedLatest commit: d81342a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Interesting — any idea why these elements are being treated as interactive in the first place? Is that a (possibly upstream) bug? |
|
The logic |
|
I think we should rather fix the fact that those were considered interactive (or figure out if they are indeed interactive) and fix that inside |
I dug into this more, and it does look like a classification issue rather than an intentional exception for table elements.
Good catch — I checked that edge case.
Agreed. After digging into it more, I think the better fix is to correct why these elements are considered interactive in the first place rather than keep the extra |
e9d45ed to
29b0f48
Compare
|
I chose to fix this in |
187d353 to
e7b28ba
Compare
e7b28ba to
d81342a
Compare
codeCraft-Ritik
left a comment
There was a problem hiding this comment.
The Explanation: Excellent. Explaining that tr, td, and th were previously treated as "interactive enough" to bypass the warning is great context.
Fixes #17963
This fixes a gap in the
a11y_click_events_have_key_eventscompiler warning for table elements with click handlers. Previously, visible non-interactive elements likediv,span, andsectioncorrectly warned, buttrdid not because table row and cell elements were treated as interactive enough to bypass this warning path. This change narrowly updates the warning check so thattr,td, andthare included.feat:,fix:,chore:, ordocs:.packages/svelte/src, add a changeset (npx changeset).Tests and linting
pnpm testand lint the project withpnpm lint