Thanks to visit codestin.com
Credit goes to github.com

Skip to content

@analogjs/vitest-angular doesn't run a11y tests #1864

@artaommahe

Description

@artaommahe

Please provide the environment you discovered this bug in.

  • use https://github.com/brandonroberts/angular-vite-storybook
  • add a11y addon
  • set primary button's color .storybook-button--primary to #222222 in src/stories/button.css
  • npx vitest
  • see no a11y errors
  • open storybook and see color contrast violation for primary button in a11y tab
  • run a11y tests in storybook ui and see no errors

Which area/package is the issue in?

vitest-angular

Description

I haven't debuged this too deep, but for me it looks like afterEach function from @storybook/addon-a11y/preview is not called with this setup.
Just in case I've checked the minimum setup with clean react + vite and that afterEach is called there and a11y errors are successfully reported both in cli and in storybook ui.

Please provide the exception or error you saw


Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions