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

Upgrade Storybook and set up accessibility testing addon #13

Merged
merged 2 commits into from
Aug 25, 2024

Conversation

doubleedesign
Copy link
Contributor

@doubleedesign doubleedesign commented Aug 18, 2024

The main purpose of this PR is to introduce the accessibility (a11y) testing add-on into our Storybook workflow. As part of this, I:

  • Refactored the theme wrapping decorator into its own component and file, due to the need to add a11y-addon related code to the decorator(s) as well.
  • Created a new, separate WithA11yTests decorator to add a workaround for a bug where the a11y test results come back empty when changing the selected story (seems to be a timing issue, race condition, or something along those lines). How this works is when a story renders/re-renders and the a11y tests run, if the three result categories (passes, violations, and incomplete) all return empty, a re-run of the test is triggered.
  • Upgraded Storybook to the latest version, because that's just good dependency hygiene.
  • Separated and updated some ESLint config because it wasn't working correctly on Storybook config files.
  • Fixed some miscellaneous TypeScript warnings that I came across in the course of this work.

@doubleedesign doubleedesign requested a review from a team as a code owner August 18, 2024 06:29
…corator that re-runs tests if an empty result is returned; associated config updates
@doubleedesign doubleedesign merged commit 77bab1a into main Aug 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant