emulsify-ds / emulsify-drupal

Drupal theme built with Storybook and Webpack
GNU General Public License v2.0
91 stars 42 forks source link

refactor(accessibility testing): automates generation of story ids for accessiblity testing #252

Closed calebtr-metro closed 2 years ago

calebtr-metro commented 2 years ago

Updates a11y script to generate a list of stories and uses that list for accessibility testing. Allows for ignoring stories in accessibility testing.

GH-151

What:

Removes the need to manually maintain a list of stories for accessibility testing. Allows projects to manually ignore specific stories in accessibility testing.

Why:

This change reduces cognitive load on developers as they no longer have to manually maintain the list of components to be tested for accessibility.

How:

Leverages Storybook's ability to provide a JSON object containing a project's stories (https://storybook.js.org/docs/react/sharing/storybook-composition#improve-your-storybook-composition).

h/t philwolstenholme for providing the script and documentation at (https://github.com/emulsify-ds/emulsify-drupal/issues/151#issuecomment-881329883).

To Test:

calebtr-metro commented 2 years ago

Closing this PR, as the issue has been moved to Compound. A new PR will be created for that project.