The $axe
is available on the property injected into the Vue instance, so it is available everywhere in your application.
To execute the $axe.run
method to check manually your document or any desired HTMLElement.
Key | Type | Default |
---|---|---|
clearConsole | Boolean | The same as clearConsoleOnUpdate |
element | Document or HTMLElement | element from options or document |
label | Strong | Run manually |
methods: {
axeRun() {
this.$axe.run({
clearConsole: true,
element: this.$el, // or document, document.querySelector('.selector'), ...
label: 'Logo component'
})
}
}
Use the $axe.plugins
method to have access to registered plugins.
::: tip To see how to register your plugins click here :::
methods: {
handle () {
this.$axe.plugins.myPlugin.run()
}
}
::: tip Learn more about Axe docs: Plugins :::