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 - Disable accessibility tab in a single story #6849

Closed
Aekal opened this issue May 21, 2019 · 3 comments
Closed

Addon-a11y - Disable accessibility tab in a single story #6849

Aekal opened this issue May 21, 2019 · 3 comments

Comments

@Aekal
Copy link

Aekal commented May 21, 2019

Describe the bug
I can't find a way to disable accessibility tab in a single story.
In config.js I have defined decorator addDecorator(withA11y) and in some stories I want to disable this tab. For example I have a simple component like input without label, so I don't need to see violations related to missing label.
I tried to use disable option as in info addon (tab is empty there), but it doesn't seem to work:

.addParameters({
  a11y: {
    disable: true
  }
})
.addParameters({
  info: {
    disable: true
  }
})

and this code disables all rules not only in single story but in every one

.addParameters({
  a11y: {
    config: { // axe-core configurationOptions (https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#parameters-1)
      disableOtherRules: true
    }
  }
})

And going further I have a second question. How to pass specific axe rules for only a single story?

Expected behavior
Hide or leave empty accessibility tab when disable: true option is passed

System:

  • OS: MacOS
  • Framework: Vue
  • Addons: A11y
  • Version: 5.0.11
@stale
Copy link

stale bot commented Jun 13, 2019

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Jun 13, 2019
@shilman
Copy link
Member

shilman commented Jul 5, 2019

Whoopee!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.2.0-alpha.36 containing PR #6923 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

@shilman
Copy link
Member

shilman commented Jul 8, 2019

Ermahgerd!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.2.0-alpha.37 containing PR #7333 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

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

No branches or pull requests

3 participants