chore: enable accessibility lint safeguards - #4680
Conversation
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
be0c85c to
794454a
Compare
@trigger.dev/build
trigger.dev
@trigger.dev/core
@trigger.dev/python
@trigger.dev/react-hooks
@trigger.dev/redis-worker
@trigger.dev/rsc
@trigger.dev/schema-to-json
@trigger.dev/sdk
commit: |
| "correctness": "error" | ||
| }, | ||
| "plugins": ["typescript", "import", "react"], | ||
| "plugins": ["typescript", "import", "react", "jsx-a11y"], |
There was a problem hiding this comment.
🔍 Adding the jsx-a11y plugin also turns on correctness rules that are not listed explicitly
Because categories.correctness is set to error (.oxlintrc.json:3-5), adding "jsx-a11y" to plugins implicitly enables every jsx-a11y rule in the correctness category, not only the ones explicitly listed. The explicit "error" entries (lines 86-106) are therefore mostly redundant, while unlisted correctness rules such as jsx-a11y/lang, jsx-a11y/mouse-events-have-key-events and jsx-a11y/no-noninteractive-tabindex become active silently. I checked the obvious candidates in the repo (only apps/webapp/app/routes/storybook.timeline/route.tsx:231 uses onMouseOver, and it is on a custom Timeline.Row component rather than a DOM element), so I did not find a concrete violation, but this is worth confirming by running pnpm run lint locally since the local checkout has no node_modules and the linter could not be executed during review.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Enable accessibility rules that catch invalid ARIA usage, inaccessible media, and invalid focus behavior before they reach users.
Base: #4679