I've tried to limit inspect elements only to selector scope.
In config.js file I added:
addDecorator(withA11Y);
addParameters({
a11y: {
element: '#foo'
}
});
Expected behavior
It should be limited to provided selector.
Screenshots

Code snippets
If applicable, add code samples to help explain your problem.
System:
I've also noticed that addon should work with import { withA11y } from '@storybook/addon-a11y' and addDecorator(withA11y). However, it seems to be working without a decorator. What's more I also tried to do something like this: import { } from '@storybook/addon-a11y' and it also worked.
Maybe there is something wrong with index.js file.
Could someone explain me, please, what's wrong?
@customcodepl I just took a look at the code and it looks like the addon lost support for the element parameter in the v4 => v5 upgrade:
https://github.com/storybooks/storybook/blob/next/addons/a11y/src/index.js#L14
Should be easy to add back -- any interest in taking a shot at that?
I take this issue.
Ready!
You rock @Armanio !!!
Ermahgerd!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.4 containing PR #5996 that references this issue. Upgrade today to try it out!
Because it's a pre-release you can find it on the @next NPM tag.
Closing this issue. Please re-open if you think there's still more to do.
Most helpful comment
I take this issue.