Closed gf3 closed 8 years ago
After installing the dependency i get the following warning:
WARNING in ./~/react-a11y/lib/util/test-rules.js
Critical dependencies:
28:23-69 the request of a dependency is an expression
@ ./~/react-a11y/lib/util/test-rules.js 28:23-69
Which is here.
Hi @gf3
Thanks for looking into it!
I probably needed to mention that to use test-rules.js
you need to install chai
yourself. It is in react-a11y
s devDependencies
and so it's not installed automatically.
The second error is harder to fix. I need to look at the web pack config to make sure the require context is generated somehow. This should not be a problem when you are only doing server-side tests though.
hi @romeovs i actually can't get the package to output any a11y warnings at all (no errors either). do i need to manually include all the rules i'd like to use?
By default all the rules are turned "off"
so you'd need to turn them on:
a11y(React, ReactDOM, {
rules: {
'img-uses-alt': 'warn'
, 'redundant-alt': 'warn'
// all the rules!
}
})
ahh thanks! i would consider adding that to the README
I will!
Getting the following error when attempting to use your version of
react-a11y
in my project: