histoire icon indicating copy to clipboard operation
histoire copied to clipboard

A11y testing

Open Akryum opened this issue 3 years ago • 8 comments

We could leverage axe to get accessibility testing for stories.

Akryum avatar May 09 '22 06:05 Akryum

Hi, something similar to this addon https://storybook.js.org/addons/@storybook/addon-a11y?

I think it could be a really nice feature

alvarosabu avatar Jun 23 '22 16:06 alvarosabu

@Akryum I will like to take this one, since I need it for my product.

Any wish list?

alvarosabu avatar Aug 05 '22 15:08 alvarosabu

We can probably take inspiration from the ally one. Maybe a good first step would be to do some discovery about the things we might need to add to the Plugin API.

Akryum avatar Aug 05 '22 15:08 Akryum

@Akryum Is it possible to create a new tab through the Plugin API? Also how to add the UI inside the tab (for example a list of the accessibility violations and links)

Screenshot 2022-08-09 at 15 24 46

alvarosabu avatar Aug 09 '22 13:08 alvarosabu

That's thing that we would need to add to the Plugin API. Do you confirm you need the following for now?

  • [x] Add a new tab
  • [x] Render a component in it using the bundled Vue (integrate with the UI).

Akryum avatar Aug 09 '22 13:08 Akryum

Yes, I think those two points will set the bases for plugins that need UI.

I wonder how we could access the current story document from the API ? With api.onPreviewStory?

I need to investigate if axe only works with a selector or if you can actually pass HTML, not sure

alvarosabu avatar Aug 09 '22 13:08 alvarosabu

https://github.com/histoire-dev/histoire/discussions/240

Akryum avatar Aug 13 '22 13:08 Akryum