Skip to content

Addon A11y: Fix setup as part of storybook create #31403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2025

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented May 7, 2025

Closes #31402

What I did

This PR fixed the postinstall execute, using execa in a compatible way

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This pull request has been released as version 0.0.0-pr-31403-sha-04221415. Try it out in a new sandbox by running npx [email protected] sandbox or in an existing project with npx [email protected] upgrade.

More information
Published version 0.0.0-pr-31403-sha-04221415
Triggered by @yannbf
Repository storybookjs/storybook
Branch yann/fix-a11y-postinstall
Commit 04221415
Datetime Wed May 7 11:25:25 UTC 2025 (1746617125)
Workflow run 14882163310

To request a new release of this pull request, mention the @storybookjs/core team.

core team members can create a new canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=31403

Greptile Summary

Updates the postinstall script for the Vitest addon to improve accessibility addon setup and error handling during Storybook initialization.

  • Modified code/addons/vitest/src/postinstall.ts to reorder a11y addon setup after Vitest configuration
  • Improved error handling by displaying actual error messages during a11y setup failures
  • Optimized command structure by removing redundant 'storybook' from command array
  • Added conditional config-dir flag only for non-default Storybook directories

Copy link

nx-cloud bot commented May 7, 2025

View your CI Pipeline Execution ↗ for commit 0422141.

Command Status Duration Result
nx run-many -t check -c production --parallel=7 ✅ Succeeded 7s View ↗
nx run-many -t build -c production --parallel=3 ✅ Succeeded 19s View ↗

☁️ Nx Cloud last updated this comment at 2025-05-07 11:32:56 UTC

@yannbf yannbf force-pushed the yann/fix-a11y-postinstall branch 3 times, most recently from 3d0bd00 to 5f91389 Compare May 7, 2025 10:03
@storybook-bot
Copy link
Contributor

Failed to publish canary version of this pull request, triggered by @yannbf. See the failed workflow run at: https://github.com/storybookjs/storybook/actions/runs/14880746512

@yannbf yannbf force-pushed the yann/fix-a11y-postinstall branch from 5f91389 to ffa1830 Compare May 7, 2025 10:34
@yannbf yannbf force-pushed the yann/fix-a11y-postinstall branch from ffa1830 to 0422141 Compare May 7, 2025 11:25
@yannbf yannbf marked this pull request as ready for review May 7, 2025 11:46
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@yannbf yannbf self-assigned this May 7, 2025
@yannbf yannbf merged commit b41ceaa into next May 7, 2025
62 of 69 checks passed
@yannbf yannbf deleted the yann/fix-a11y-postinstall branch May 7, 2025 12:27
@github-actions github-actions bot mentioned this pull request May 7, 2025
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Storybook 9 - Storybook create doesn't configure addon a11y for vitest
3 participants