chore(lint): promote jsx-a11y rules to error with scoped ui/* override (#100, a11y 2/2) - #206
Merged
Conversation
#100, a11y 2/2) Locks the accessibility gate now that app code is clean (#205): six jsx-a11y rules go from warn to error so new violations fail CI. Two policy decisions are encoded with justification comments: no-autofocus is off (every autoFocus is user-initiated focus management in inline editors and dialogs, not page-load focus stealing) and vendored src/components/ui/** gets a scoped override (fixing shadcn primitives in place would fork them from upstream).
Contributor
There was a problem hiding this comment.
Pull request overview
Locks in accessibility linting after PR #205 while preserving documented exceptions.
Changes:
- Promotes seven
jsx-a11yrules to errors. - Disables
no-autofocusper documented policy. - Exempts vendored shadcn UI primitives.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Part 2 of 2 for the accessibility pass in #100 (section 1); closes out the issue after merge. App code was cleaned in #205 - this PR locks the gate.
Changes (config only)
jsx-a11yrules promoted fromwarntoerror:no-static-element-interactions,click-events-have-key-events,label-has-associated-control,prefer-tag-over-role,control-has-associated-label,no-noninteractive-element-interactions,anchor-has-content. New violations now failbun run lintand therefore CI.no-autofocusset tooffby policy: all sixautoFocususages are user-initiated focus management (inline cell/tab editors, save dialogs), which is correct modal/editor behavior - the rule targets page-load focus stealing, which does not occur here. RemovingautoFocuswould regress UX. Justification is inline in the config.src/components/ui/**(shadcn primitives): fixing findings in place would fork them from upstream and complicate future syncs. App code outside that directory enforces the rules at error level. Justification is inline in the config.The original issue said "promote the 8 rules"; 7 are promoted and
no-autofocusis disabled per the policy above - the deviation is recorded here and in #100.Verification
With this config on top of #205:
bun run lint:oxcreports 0 jsx-a11y findings and 0 errors. All local gates pass:format/lint/typecheck/knip/test(20 groups) /build.