Skip to content

chore(lint): promote jsx-a11y rules to error with scoped ui/* override (#100, a11y 2/2) - #206

Merged
cevheri merged 1 commit into
mainfrom
fix/100-a11y-gate
Jul 15, 2026
Merged

chore(lint): promote jsx-a11y rules to error with scoped ui/* override (#100, a11y 2/2)#206
cevheri merged 1 commit into
mainfrom
fix/100-a11y-gate

Conversation

@cevheri

@cevheri cevheri commented Jul 15, 2026

Copy link
Copy Markdown
Member

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)

  • Six jsx-a11y rules promoted from warn to error: 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 fail bun run lint and therefore CI.
  • no-autofocus set to off by policy: all six autoFocus usages 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. Removing autoFocus would regress UX. Justification is inline in the config.
  • Scoped override for vendored 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-autofocus is disabled per the policy above - the deviation is recorded here and in #100.

Verification

With this config on top of #205: bun run lint:oxc reports 0 jsx-a11y findings and 0 errors. All local gates pass: format / lint / typecheck / knip / test (20 groups) / build.

#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).
Copilot AI review requested due to automatic review settings July 15, 2026 18:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Locks in accessibility linting after PR #205 while preserving documented exceptions.

Changes:

  • Promotes seven jsx-a11y rules to errors.
  • Disables no-autofocus per documented policy.
  • Exempts vendored shadcn UI primitives.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud

Copy link
Copy Markdown

@cevheri
cevheri merged commit 7ebb35e into main Jul 15, 2026
17 checks passed
@cevheri
cevheri deleted the fix/100-a11y-gate branch July 15, 2026 18:47
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.

2 participants