Skip to content

Add accessibility coverage for PackageSizeIncreaseAnalysis #3078

Description

@coderabbitai

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: #3077 and #3077 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a11yRelated to accessibility and inclusion

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions