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: Move stories into addon #19114

Merged
merged 13 commits into from
Sep 12, 2022
Merged

Addon-a11y: Move stories into addon #19114

merged 13 commits into from
Sep 12, 2022

Conversation

ndelangen
Copy link
Member

  • add generic stories for addon-viewports in code/addons/a11y/template/stories
  • remove stories for a11y everywhere else

@ndelangen ndelangen changed the title move all a11y stories to be renderer agnostic into addons/a11y/templa… Addon-a11y: Move stories into addon Sep 5, 2022
@ndelangen ndelangen self-assigned this Sep 5, 2022
@ndelangen ndelangen added the maintenance User-facing maintenance tasks label Sep 5, 2022
As a11y stories are no longer present, I had to target something else for the same purpose.
Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

I feel like there are a lot of stories deleted here that we need to figure out how to reimplement somehow. Obviously a11y is tricky as the stories depend on HTML structure, is this blocked by creating an Html component?

@ndelangen
Copy link
Member Author

@tmeasday I argued to @shilman that we should test the things that matter, and are storybook implemented. I think there's no point in testing axe internals.

But yes, I do think this is blocked for now, and likely should not be merged, or if we do, we should create follow-up tasks to ensure we get the proper coverage again.

@ndelangen
Copy link
Member Author

@tmeasday quick question for you about the sandbox script.
So I have the stories show up, but the a11y panel does not show up in the published storybook, and I'm struggling to find why it's not showing up... can you tell me where to look?

https://62f0fd0fd0ff1407689dfeca-xpfmtcuisw.chromatic.com/?path=/story/addons-a11y-parameters--checks&globals=backgrounds.grid:false

I can only see 3: Controls, Actions & Interactions..
But I do not see A11y panel.

@tmeasday
Copy link
Member

tmeasday commented Sep 9, 2022

@ndelangen I think the issue is you added a11y to the set of "default" addons whose stories are linked by the sandbox. But this is supposed to just represent the list of addons that come installed by sb init. If you want to use an addon or stories for an addon that is outside of that list (links, essentials and interactions), you need to pass --addon a11y to the sandbox script. We should probably do that in CI.

@tmeasday
Copy link
Member

Addendum to the above, the --addon option doesn't actually work because sb add doesn't work, so for now you need to manually add the addon in main.js (and maybe package.json) to actually test this. 🙈

Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

This is pretty close, I just wonder if it might be better to move some of the parameter-based stories to the other file. @ndelangen I'll leave it to you to make the final call!

Comment on lines 36 to 42
export const Targetted = {
parameters: {
a11y: {
element: 'button',
},
},
};
Copy link
Member

Choose a reason for hiding this comment

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

Is it obvious this is doing something? Would it be better to do these kind of things in the HTML-based story file?

@ndelangen
Copy link
Member Author

All right, i think I've improved things a bit, will merge when green!

@ndelangen ndelangen merged commit c00654b into next Sep 12, 2022
@ndelangen ndelangen deleted the norbert/sb-574-addon-a11y branch September 12, 2022 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants