File tree 4 files changed +14
-22
lines changed
4 files changed +14
-22
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ if (process.env.NODE_ENV !== 'production') {
26
26
## Configuration
27
27
| Key | Type | Description | Default
28
28
| ---------------------- | -------- |-------------------------------------------------------------- | -----------
29
+ | ` auto ` | Boolean | Disables automatic verification. Only checks with ` $axe.run ` | ` true `
29
30
| ` clearConsoleOnUpdate ` | Boolean | Clears the console each time ` vue-axe ` runs | ` false `
30
31
| ` customResultHandler ` | Function | Handle the results. (This may be needed for automated tests)
31
32
| ` 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 )
Original file line number Diff line number Diff line change 1
1
import Vue from 'vue'
2
- import VueAxe from 'vue-axe'
2
+ import VueAxe from '../ vue-axe'
3
3
import App from './App.vue'
4
4
import router from './router.js'
5
5
6
6
// Don't use this plugin in production => if (process.env.NODE_ENV !== 'production')
7
- Vue . use ( VueAxe , {
8
- clearConsoleOnUpdate : true
9
- } )
7
+ Vue . use ( VueAxe )
10
8
Vue . config . productionTip = false
11
9
12
10
/* eslint-disable no-new */
Original file line number Diff line number Diff line change 37
37
@click =" showAlt = !showAlt"
38
38
v-text =" showAlt ? 'Remove the alt tag from the logo' : 'Add an alt tag to the logo'"
39
39
/>
40
- <button @click =" correctedLinkColor = !correctedLinkColor " >
40
+ <button @click =" toggleLinkColor " >
41
41
Change links color
42
42
</button >
43
43
@@ -99,29 +99,18 @@ export default {
99
99
},
100
100
data () {
101
101
return {
102
- // num: 0,
103
102
correctedLinkColor: false ,
104
103
showAlt: false ,
105
104
scope: true
106
105
}
107
106
},
108
- // mounted()
109
- // {
110
- // this.updateNumber();
111
- // },
112
- // mounted () {
113
- // setTimeout(() => {
114
- // this.$axe.run({ clearConsole: false })
115
- // }, 5000)
116
- // },
117
107
methods: {
118
- // updateNumber()
119
- // {
120
- // setTimeout(() => {
121
- // this.num += 1;
122
- // this.updateNumber();
123
- // }, 500);
124
- // }
108
+ toggleLinkColor () {
109
+ this .correctedLinkColor = ! this .correctedLinkColor
110
+
111
+ // Using "auto: false" $axe.run working
112
+ // this.$axe.run()
113
+ }
125
114
}
126
115
}
127
116
</script >
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export default function install (Vue, options) {
8
8
if ( typeof window === 'undefined' ) return
9
9
10
10
const defaultOptions = {
11
+ auto : true ,
11
12
clearConsoleOnUpdate : false ,
12
13
delay : 0 ,
13
14
config : {
@@ -60,6 +61,9 @@ export default function install (Vue, options) {
60
61
} , 1000 , { maxWait : 5000 } )
61
62
}
62
63
64
+ // if false, disable automatic verification
65
+ if ( ! options . auto ) return
66
+
63
67
// Rechecking when updating specific component
64
68
Vue . mixin ( {
65
69
updated ( ) {
You can’t perform that action at this time.
0 commit comments