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: use channel to highlight elements in preview #10456

Merged
merged 14 commits into from
Apr 23, 2020

Conversation

tooppaaa
Copy link
Contributor

Issue:

The a11y addon is using a getIframe method to access the preview which won't work with storybook composition.

What I did

  • Refactor A11yPanel & HighlightToggle to use a context to move the logic out of these components
  • Create A11yContext in charge of handling results, what's highlighted, some addon behavior
  • Unit test
  • Use channel to highlight element in the preview
  • use additional stylesheet to highlight instead of playing directly with element's outline style

How to test

  • Highlight elements in a11y addon

@tooppaaa tooppaaa changed the title refactor(a11y): use channel to highlight elements in preview Addon A11y: use channel to highlight elements in preview Apr 17, 2020
@tooppaaa tooppaaa changed the title Addon A11y: use channel to highlight elements in preview Addon-a11y: use channel to highlight elements in preview Apr 17, 2020
@tooppaaa tooppaaa requested a review from usulpro as a code owner April 22, 2020 07:35
@ndelangen ndelangen force-pushed the feature/useChannelToHighlight branch from b31e671 to 4d1a890 Compare April 23, 2020 11:05
@ndelangen ndelangen merged commit ba8ec66 into next Apr 23, 2020
@ndelangen ndelangen deleted the feature/useChannelToHighlight branch April 23, 2020 15:47
@CodeByAlex
Copy link
Member

Great work on this! Excited to see it switched over to use some better practices

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants