Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add accessibility coverage for PackageSizeIncreaseAnalysis

Đang mở
#3,078 0 bình luận 1 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@userquin đang làm issue này rồi.

Từ ngày 25/7/2026.

  • #3077 của @userquin — đã đóng, không merge

Đánh giá

Issue này chưa được đánh giá.

Mô tả

a11y

Summary

Add automated Vitest accessibility coverage for PackageSizeIncreaseAnalysis and remove its temporary exclusion from the component-coverage guard.

The component currently depends on the worker-backed useAnalyzeCauseWorker composable, so the test must isolate the UI from real Web Worker and IndexedDB behaviour.

Required changes

  • Add an accessibility/component test for app/components/Package/SizeIncreaseAnalysis.vue.
  • Mock useAnalyzeCauseWorker (and the worker boundary if the established test setup requires it) with reactive, type-safe state and no-op actions.
  • Cover the initial available state and assert that axe reports no accessibility violations.
  • Remove the Package/SizeIncreaseAnalysis.vue TODO/entry from SKIPPED_COMPONENTS in test/unit/a11y-component-coverage.spec.ts.

Rationale

The current skip leaves the new package-size analysis UI outside the repository’s required component accessibility coverage. A deterministic mock prevents browser-worker and IndexedDB dependencies from making the test brittle.

Affected areas

  • app/components/Package/SizeIncreaseAnalysis.vue
  • app/composables/pkg-size/useAnalyzeCauseWorker.ts
  • test/nuxt/a11y.spec.ts (or the established component-test location)
  • test/unit/a11y-component-coverage.spec.ts

Acceptance criteria

  • A Vitest test mounts PackageSizeIncreaseAnalysis with a mocked analysis composable.
  • The test performs an axe accessibility assertion without starting a real worker.
  • The temporary coverage skip and its TODO are removed.
  • The relevant test suite passes.

Requested by @userquin.

Backlinks: https://github.com/npmx-dev/npmx.dev/pull/3077 and https://github.com/npmx-dev/npmx.dev/pull/3077#discussion_r3649237902

Ngôn ngữ chính
TypeScript
Star
3.6k
Fork
533
Merge trung bình
4 ngày 13 giờ
Pull request đã merge (30 ngày)
37

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của npmx-dev/npmx.dev

Tất cả issue của npmx-dev/npmx.dev

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.