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

Run storybook axe scans on CI builds #5580

Closed
wants to merge 6 commits into from

Conversation

kendallgassner
Copy link
Contributor

@kendallgassner kendallgassner commented Jan 21, 2025

We noticed in #5559 that our axe-scans do not run on every storybook story. This PR aims to fix that.

Closes #

Changelog

New

Changed

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

Copy link

changeset-bot bot commented Jan 21, 2025

⚠️ No Changeset found

Latest commit: 154e062

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jan 21, 2025
Copy link
Contributor

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

Copy link
Contributor

github-actions bot commented Jan 21, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 104.54 KB (0%)
packages/react/dist/browser.umd.js 104.88 KB (0%)

@kendallgassner kendallgassner added the skip changeset This change does not need a changelog label Jan 21, 2025
@joshblack
Copy link
Member

joshblack commented Jan 21, 2025

Hi here, @kendallgassner! 👋

Just providing some context, storybook axe scans currently run through playwright (for example) instead of in Jest so that we can get contrast checks reported accurately. We still have some old test suites that use this technique but we can get rid of them (I think 😅)

If you're seeing a story not being checked against axe it'd be great to add them to the corresponding e2e test

@kendallgassner
Copy link
Contributor Author

👀 Thanks @joshblack! Is there a reason we don't do this for every story?

@joshblack
Copy link
Member

@kendallgassner I don't think so, definitely would make sense to run it on every story. It would be worth it to add a dedicated test for this so that each component e2e test doesn't have to add it explicitly which I think is likely the root cause if something is not being checked.

@kendallgassner
Copy link
Contributor Author

@joshblack cool! I'll convert this PR to aim to do that

@@ -72,7 +72,8 @@ const ButtonBase = forwardRef(
if (
innerRef.current &&
!(innerRef.current instanceof HTMLButtonElement) &&
!((innerRef.current as unknown) instanceof HTMLAnchorElement)
!((innerRef.current as unknown) instanceof HTMLAnchorElement) &&
!((innerRef.current as HTMLElement).tagName === 'SUMMARY')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know how I feel about this but the details story feels like it's incorrectly erroring here.

@kendallgassner
Copy link
Contributor Author

Closing for now while I play around with this locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm skip changeset This change does not need a changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants