Skip to content

Files

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Latest commit

d464e53 · Jul 8, 2022

History

History
52 lines (38 loc) · 1.21 KB

api.md

File metadata and controls

52 lines (38 loc) · 1.21 KB

API

The $axe is available on the property injected into the Vue instance, so it is available everywhere in your application.

Run

To execute the $axe.run method to check manually your document or any desired HTMLElement.

$axe.run

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'
    })
  }
}

Plugins

Use the $axe.plugins method to have access to registered plugins.

::: tip To see how to register your plugins click here :::

$axe.plugins


methods: {
  handle () {
    this.$axe.plugins.myPlugin.run()
  }
}

::: tip Learn more about Axe docs: Plugins :::