Skip to content

feat\!: remove the Accessibility (a11y) category - #42

Merged
oekazuma merged 6 commits into
mainfrom
chore/remove-a11y
Jun 23, 2026
Merged

oekazuma merged 6 commits into
mainfrom
chore/remove-a11y

Conversation

@oekazuma

@oekazuma oekazuma commented Jun 23, 2026 •

Copy link
Copy Markdown
Owner

Refocus svelte-vitals on its differentiated core — SEO + deep static Performance — and remove the Accessibility category. Accessibility is already well covered by the Svelte compiler, eslint-plugin-svelte, and axe; svelte-vitals shouldn't duplicate it.

Breaking change

a11y shipped in v0.5 (aggregating the Svelte compiler's a11y_* warnings). This removes it:

  • the a11y collector (packages/cli/src/providers/source/a11y.ts) and its wiring in analyzeProject;
  • the a11y_* known-id acceptance and the a11y_category allow-list sentinel in rules-config;
  • the a11y entry from the score/Health breakdown and the console reporter;
  • Category is narrowed to 'seo' | 'performance' (the never-used 'maintainability' Upgrade slot is dropped too).

After this, the Health score is the weighted mean of the present category scores (SEO, plus Performance when the project has images), and categories.a11y no longer appears in any reporter or the MCP analyze output. --ignore a11y_* is now an unknown-rule-id error.

SEO and Performance findings, scoring, --min-health, the reporters, the vite plugin, and MCP are otherwise unchanged.

Validation

  • pnpm -r test — 255 passed (4 packages)
  • pnpm -r typecheck, pnpm build, pnpm lint, publint + attw (esm-only) — green
  • Grep confirms no a11y/maintainability/collectA11y left under packages/*/src or tests. Package CHANGELOG.md files keep their historical release entries (immutable history, intentionally retained); the README comparison-table row about other tools also stays.

Notes for reviewers

  • Built subagent-driven: 3 tasks (each spec+quality reviewed) + a whole-branch review (verdict: ready to merge).
  • Task ordering kept each commit green: CLI a11y removal landed before the core Category narrowing.
  • This is the first step of the re-drawn 1.0 roadmap (thesis: SEO + deep Performance core; Lighthouse-like visualization; tight AI-agent integration; Astro docs). Next: the docs site.

🤖 Generated with Claude Code

oekazuma and others added 5 commits June 23, 2026 12:17
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…inability)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Removes the Accessibility (a11y) category from svelte-vitals end-to-end: deletes the CLI collectA11y provider, removes its result-merge from analyzeProject, strips a11y/sentinel handling from rules-config, narrows the core Category type to 'seo' | 'performance', updates the console reporter and health scoring, removes all related tests, and adds a breaking-change changeset with accompanying design and plan docs.

Changes

Remove Accessibility Category

Layer / File(s) Summary
Core Category type, console reporter, and health scoring
packages/core/src/types.ts, packages/core/src/reporter/console.ts, packages/core/test/health.test.ts
Category is narrowed to 'seo' | 'performance'; CATEGORY_LABEL/CATEGORY_ORDER drop a11y and maintainability; the computeHealth test is updated to average only SEO and Performance with weights: { seo: 1, performance: 1 }.
CLI a11y collector, rules-config, and fixture cleanup
packages/cli/src/index.ts, packages/cli/src/rules-config.ts, packages/cli/src/providers/source/a11y.ts, packages/cli/test/fixtures/.../img/+page.svelte, packages/cli/test/rules-config.test.ts, packages/cli/test/run.test.ts
collectA11y is removed entirely; analyzeProject applies severities to runRules output only; findUnknownRuleIds drops the a11y_*/sentinel exception; buildRulesConfig drops a11y-category suppression; the <img> fixture regains its alt attribute; a11y-specific rules-config and e2e test assertions are deleted.
Design spec, plan, changeset, and README
docs/superpowers/specs/2026-06-23-remove-a11y-design.md, docs/superpowers/plans/2026-06-23-remove-a11y.md, .changeset/remove-a11y.md, README.md
Design spec and implementation plan document the breaking-change scope and Category contract; the changeset declares minor bumps with a breaking callout for removed a11y findings and categories.a11y; the README roadmap bullet is updated to describe Health as SEO+Performance only.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

  • oekazuma/svelte-vitals#36: Added the multi-category performance foundation that this PR now uses as the complete Category contract (seo | performance), making it a direct prerequisite.
  • oekazuma/svelte-vitals#38: Introduced the collectA11y provider, a11y_category sentinel, and all a11y test coverage that this PR entirely removes.
  • oekazuma/svelte-vitals#40: Added weighted Health scoring across SEO/Performance/A11y; this PR renormalizes that same computeHealth pipeline to only two categories.

Poem

🐰 Hop hop, the a11y's gone today,
No more collecting those warnings astray.
Just SEO and Performance remain,
The Category type is neat and plain.
Two scores to average, nothing more—
A cleaner codebase than before! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat!: remove the Accessibility (a11y) category' directly and specifically describes the main change—removing the a11y category from the project—and uses the breaking change indicator (!) to convey the impact.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/remove-a11y

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

This PR removes the Accessibility (a11y) category from svelte-vitals, refocusing analysis and scoring on SEO + Performance only. It updates the CLI pipeline, core types/reporting, tests/fixtures, and release notes to reflect the breaking change.

Changes:

  • Delete the CLI a11y collector and remove its integration/config surface (a11y_* ids now become unknown).
  • Narrow core Category to 'seo' | 'performance' and trim console reporter category labeling/order accordingly.
  • Update tests/fixtures/docs and add a Changeset documenting the breaking change.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Removes shipped “Accessibility checks” mention; updates Health Report description to SEO+Performance.
packages/core/test/health.test.ts Updates Health scoring test to remove a11y category expectations.
packages/core/src/types.ts Narrows Category union to 'seo' | 'performance'.
packages/core/src/reporter/console.ts Removes a11y/maintainability labels and ordering from console reporter.
packages/cli/test/run.test.ts Removes CLI e2e test asserting a11y output.
packages/cli/test/rules-config.test.ts Removes tests for a11y known-id acceptance and a11y_category sentinel behavior.
packages/cli/test/fixtures/basic-project/src/routes/img/+page.svelte Restores alt on the fixture image now that a11y is removed.
packages/cli/test/a11y.test.ts Deletes unit tests for the removed a11y collector.
packages/cli/src/rules-config.ts Simplifies unknown-rule validation and removes a11y prefix/sentinel logic.
packages/cli/src/providers/source/a11y.ts Deletes the a11y collector implementation.
packages/cli/src/index.ts Removes a11y collection/merge from analyzeProject results.
docs/superpowers/specs/2026-06-23-remove-a11y-design.md Adds design doc describing scope/decisions for removing a11y.
docs/superpowers/plans/2026-06-23-remove-a11y.md Adds implementation plan documenting the removal steps and validation.
.changeset/remove-a11y.md Adds release notes + version bumps for the breaking change.

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

Comment thread README.md Outdated
Comment thread README.md Outdated
…en imaged)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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