Skip to content

Commit a0c8785

Browse files
Add more setup details to readme
1 parent c6165d8 commit a0c8785

File tree

1 file changed

+46
-3
lines changed

1 file changed

+46
-3
lines changed

Diff for: README.md

+46-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,51 @@
22

33
A Gatsby plugin to add `@axe-core/react` accessibility testing to Gatsby markup.
44

5-
## Installation
5+
## Install
66

77
```shell
8-
yarn install @axe-core/react axe-core gatsby-plugin-axe-core-react --dev
9-
```
8+
yarn add @axe-core/react axe-core gatsby-plugin-axe-core-react --dev
9+
```
10+
11+
## How to use
12+
13+
```javascript
14+
// In your gatsby-config.js
15+
16+
plugins: [`gatsby-plugin-axe-core-react`]
17+
```
18+
19+
or
20+
21+
```javascript
22+
// In your gatsby-config.js
23+
24+
plugins: [
25+
{
26+
resolve: 'gatsby-plugin-axe-core-react',
27+
options: {
28+
axeConfig,
29+
axeContext,
30+
debounce,
31+
},
32+
},
33+
]
34+
```
35+
36+
React-axe will now print a11y warnings to your browser's console. 🎉
37+
38+
39+
### Configuration options
40+
You can use the following options if you wish to to override the default config.
41+
42+
[**`axeConfig`**](https://www.npmjs.com/package/@axe-core/react#configuration) [object][optional]
43+
44+
The configuration object for axe-core.
45+
46+
[**`axeContext`**](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#context-parameter) [object][optional]
47+
48+
Used to specify which element should and which should not be tested.
49+
50+
[**`debounce`**](https://www.npmjs.com/package/@axe-core/react#debouncing) [number][optional]
51+
52+
The number of milliseconds to wait for component updates to cease before performing an analysis of all the changes.

0 commit comments

Comments
 (0)