Skip to content

Commit d18a02d

Browse files
committed
Update README
1 parent 40f7f6f commit d18a02d

File tree

1 file changed

+21
-35
lines changed

1 file changed

+21
-35
lines changed

Diff for: README.md

+21-35
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Accessibility auditing for Vue.js applications by running [dequelabs/axe-core](h
55
## Install package
66
#### NPM
77
```shell
8-
npm install -D vue-axe
8+
npm install -D axe-core vue-axe
99
```
1010

1111
#### Yarn
1212
```shell
13-
yarn add -D vue-axe
13+
yarn add -D axe-core vue-axe
1414
```
1515
---
1616

@@ -20,25 +20,19 @@ import Vue from 'vue'
2020

2121
if (process.env.NODE_ENV !== 'production') {
2222
const VueAxe = require('vue-axe')
23-
Vue.use(VueAxe, {
24-
config: {
25-
// ...
26-
rules: [
27-
{ id: 'heading-order', enabled: true },
28-
{ id: 'label-title-only', enabled: true },
29-
// and more
30-
]
31-
}
32-
})
23+
Vue.use(VueAxe)
3324
}
3425
```
35-
#### Configuration
36-
|Key|Description|Default|Required|
37-
|---|---|---|---|
38-
|`clearConsoleOnUpdate`|Clears the console each time `vue-axe` runs|`true`|`false`|
39-
|`customResultHandler`|Handle the results from an `axe.run()`. This may be needed for automated tests.|`undefined`|`false`|
40-
|`config`|Provide your Axe-core configuration: https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure| |`false`|
41-
|`runOptions`|Provide your Axe-core runtime options: [API Name: axe.run](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#options-parameter)|`{ reporter: 'v2', resultTypes: ['violations'] }`|`false`|
26+
### Configuration
27+
| Key | Type | Description | Default
28+
| ---------------------- | -------- |-------------------------------------------------------------- | -----------
29+
| `clearConsoleOnUpdate` | Boolean | Clears the console each time `vue-axe` runs | `false`
30+
| `customResultHandler` | Function | Handle the results. (This may be needed for automated tests)
31+
| `config` | Object | Provide your [Axe-core configuration](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure) | [See default config](https://github.com/vue-a11y/vue-axe/blob/master/src/index.js#L13)
32+
| `runOptions` | Object | Provide your [Axe-core runtime options](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#options-parameter) | [See default runOption](https://github.com/vue-a11y/vue-axe/blob/master/src/index.js#L18)
33+
| `delay` | Number | Used to delay the first check. - `Millisecond`
34+
| `style` | Object | Customize style for console logs. | [See default style](https://github.com/vue-a11y/vue-axe/blob/master/src/index.js#L22)
35+
| `plugins` | Array | Register Axe plugins. [Axe docs: Plugins](https://github.com/dequelabs/axe-core/blob/master/doc/plugins.md)
4236

4337
#### Custom Result Handler
4438

@@ -65,11 +59,7 @@ import Vue from 'vue'
6559

6660
if (process.env.NODE_ENV !== 'production') {
6761
const VueAxe = require('vue-axe')
68-
Vue.use(VueAxe, {
69-
config: {
70-
// your configuration data
71-
}
72-
})
62+
Vue.use(VueAxe)
7363
}
7464

7565
```
@@ -78,32 +68,27 @@ In config file `nuxt.config.js`
7868
```javascript
7969
...
8070
plugins: [
81-
{ src: '~/plugins/axe', ssr: false }
71+
{ src: '~/plugins/axe.js', mode: 'client' }
8272
]
8373
```
8474

8575
## Using with HTML files
8676
#### CDN
8777
```html
88-
<!-- Required Javascript -->
8978
<script src="https://unpkg.com/vue"></script>
9079
<script src="https://unpkg.com/vue-axe"></script>
9180
```
9281

9382
```javascript
94-
Vue.use(VueAxe, {
95-
config: {
96-
// your configuration data
97-
}
98-
})
83+
Vue.use(VueAxe)
9984
```
10085
## See demo
10186
https://vue-axe.surge.sh/
10287

10388
## Run the demo
10489
```shell
105-
git clone https://github.com/vue-a11y/vue-axe.git vue-axe-demo
106-
cd vue-axe-demo/demo
90+
git clone https://github.com/vue-a11y/vue-axe.git vue-axe
91+
cd vue-axe/demo
10792
npm install
10893
npm run dev
10994
```
@@ -115,6 +100,7 @@ After the commands just access the http://localhost:8080/
115100
## Run the tests
116101
```shell
117102
git clone https://github.com/vue-a11y/vue-axe.git vue-axe
103+
cd vue-axe
118104
npm install
119105
npm run test
120106
```
@@ -125,11 +111,11 @@ npm run test:open
125111
```
126112

127113
## Contributing
114+
- From typos in documentation to coding new features;
128115
- Check the open issues or open a new issue to start a discussion around your feature idea or the bug you found;
129116
- Fork repository, make changes and send a pull request;
130117

131-
If you want a faster communication, find me on [@ktquez](https://twitter.com/ktquez)
132-
And follow us on Twitter [@vue_a11y](https://twitter.com/vue_a11y)
118+
Follow us on Twitter [@vue_a11y](https://twitter.com/vue_a11y)
133119

134120
**thank you**
135121

0 commit comments

Comments
 (0)