Skip to content
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

Addon A11y: Adjust default behaviour when using with experimental-addon-test #30162

Merged
merged 32 commits into from
Jan 13, 2025

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Jan 2, 2025

Closes #

What I did

  • Update addon-a11y to not add a11y-test tag implicitly
  • Update addon-a11y installer / automigration to add commented /* 'a11y-test ' */ tag to preview.js, with a comment explaining what it can do for you
  • Update the checkbox behavior for addon-a11y and to be checked by default (if at least one story has a11y-test tag set?)

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-30162-sha-fc2610f4. 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-30162-sha-fc2610f4
Triggered by @valentinpalkovic
Repository storybookjs/storybook
Branch valentin/a11y-refactorings
Commit fc2610f4
Datetime Thu Jan 9 14:13:14 UTC 2025 (1736431994)
Workflow run 12691645189

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=30162

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.8 MB 77.8 MB 0 B 1.97 0%
initSize 131 MB 131 MB 0 B 1.98 0%
diffSize 53 MB 53 MB 0 B 0.76 0%
buildSize 7.19 MB 7.19 MB 1 B 0.59 0%
buildSbAddonsSize 1.85 MB 1.85 MB 0 B - 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.87 MB 1.87 MB 0 B -0.33 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.91 MB 3.91 MB 0 B -0.33 0%
buildPreviewSize 3.28 MB 3.28 MB 1 B 0.59 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 6.8s 6.7s -137ms -1.12 -2%
generateTime 20.9s 19.2s -1s -727ms -1.26 🔰-9%
initTime 14.2s 12.4s -1s -767ms -1.55 🔰-14.2%
buildTime 10.7s 8.7s -1s -955ms -0.83 -22.2%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5s 5s -65ms -0.01 -1.3%
devManagerResponsive 3.9s 3.6s -265ms -0.04 -7.2%
devManagerHeaderVisible 647ms 604ms -43ms -0.36 -7.1%
devManagerIndexVisible 724ms 631ms -93ms -0.58 -14.7%
devStoryVisibleUncached 1.9s 1.8s -98ms -0.2 -5.3%
devStoryVisible 722ms 632ms -90ms -0.6 -14.2%
devAutodocsVisible 525ms 480ms -45ms -0.94 -9.4%
devMDXVisible 522ms 594ms 72ms 0.73 12.1%
buildManagerHeaderVisible 571ms 594ms 23ms -0.23 3.9%
buildManagerIndexVisible 656ms 611ms -45ms -0.92 -7.4%
buildStoryVisible 553ms 575ms 22ms -0.22 3.8%
buildAutodocsVisible 435ms 524ms 89ms 0.86 17%
buildMDXVisible 448ms 491ms 43ms 0.3 8.8%

Greptile Summary

Based on the provided files and PR information, here's a concise summary of the key changes:

Modifies the behavior of the Storybook a11y addon to make accessibility testing more explicit and configurable when used with the experimental test addon.

  • Changed accessibility test tag from 'a11ytest' to 'a11y-test' for better naming consistency
  • Removed implicit addition of a11y-test tag, making it opt-in through preview configuration
  • Added automigration to help users configure a11y testing with commented tags and proper documentation
  • Updated checkbox behavior to be checked by default when any story has the 'a11y-test' tag
  • Modified test runner to only execute a11y tests when explicitly enabled in Storybook environment

The changes make accessibility testing more intentional while maintaining backward compatibility through automated migration tools.

Copy link

nx-cloud bot commented Jan 2, 2025

View your CI Pipeline Execution ↗ for commit 5a33146.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 37s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-13 09:03:47 UTC

@storybook-pr-benchmarking
Copy link

storybook-pr-benchmarking bot commented Jan 2, 2025

Package Benchmarks

Commit: 5a33146, ran on 13 January 2025 at 09:07:43 UTC

No significant changes detected, all good. 👏

@storybook-bot
Copy link
Contributor

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

@valentinpalkovic valentinpalkovic marked this pull request as ready for review January 9, 2025 14:58
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.

16 file(s) reviewed, 8 comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

@JReinhold JReinhold left a comment

Choose a reason for hiding this comment

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

A few minor suggestions, but overall looks good. (Haven't tried it out)

PS. For changes like these, I'd love just a screenshot of the terminal output in the future, so I can quickly see what the result looks like ❤️

@valentinpalkovic valentinpalkovic merged commit 66facc9 into next Jan 13, 2025
59 of 60 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/a11y-refactorings branch January 13, 2025 09:32
@valentinpalkovic valentinpalkovic changed the title A11y Addon: Adjust default behaviour when using with experimental-addon-test Addon A11y: Adjust default behaviour when using with experimental-addon-test Jan 13, 2025
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.

4 participants