You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lint: a11y-lint React .tsx components, and guard against a11y rules going dark #114
The reviews of PR #113 found two gaps in lint coverage. Neither was introduced by #113.
.tsx components get no a11y linting, and never did.eslint-plugin-astro's flat/jsx-a11y-recommended rules (astro/jsx-a11y/*) return {} unless parserServices.isAstro. So they're enabled on .tsx files but do nothing there. 46 of the 75 non-config source files are .tsx. Running eslint-plugin-jsx-a11y-x's recommended config on **/*.tsx finds 5 real issues today:
Newsletter.tsx:91 anchor-is-valid
catalyst/combobox.tsx:67 no-autofocus
catalyst/listbox.tsx:24 no-autofocus
catalyst/link.tsx:18 anchor-has-content
catalyst/sidebar.tsx:117 heading-has-content
a11y rules disappear silently if the optional peer is missing. With eslint-plugin-jsx-a11y-x removed from node_modules, lint stays green and --print-config shows 0 jsx-a11y rules, with no config error.
Proposed fix
Add eslint-plugin-jsx-a11y-x's flat recommended config for **/*.tsx in eslint.config.js.
Fix the issues it reports in our own components. For the Catalyst UI kit (which AGENTS.md says to treat as vendored), use targeted, justified disables rather than edits.
Add a CI canary that fails if a11y rules aren't active, e.g. a committed fixture with one known violation that must make eslint exit non-zero, or a --print-config | grep -q jsx-a11y/alt-text step.
Update the AGENTS.md lint line to say which file types are covered.
Activity
chore(deps)!: upgrade eslint to v10 (#113)