vue-a11y / vue-axe

Accessibility auditing for Vue.js applications.
https://axe.vue-a11y.com/
MIT License
186 stars 13 forks source link

Allow specifying root selector/element for initial report. Fix #36 #59

Open jairovg opened 2 years ago

jairovg commented 2 years ago

General Notes

This PR allows the set-up of a root element different from the document to run the audit on the first load. Fix #36

NOTE: This element will be used as the default context sent to axe.run.

// Plugin setup
Vue.use(VueAxe, {
  element: '#app'
})
// manual a11y report using a different root element, document for this sample
this.$axe.run({
  clearConsole: true,
  element: document
})

What kind of change does this PR introduce? (check at least one)

Documentation updated with the new element for the plugin config.

Does this PR introduce a breaking change? (check one)

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

fugazi commented 2 years ago

Good approach, this will enhance user experience.

edward-montoya commented 2 years ago

Awesome!!