vue-axe icon indicating copy to clipboard operation
vue-axe copied to clipboard

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

Open jairovg opened this issue 3 years ago • 2 comments

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)

  • [x] Bugfix
  • [ ] Feature
  • [ ] Code style update
  • [ ] Refactor
  • [x] Other, please describe:

Documentation updated with the new element for the plugin config.

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

  • [ ] Yes
  • [x] No

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

The PR fulfills these requirements:

  • [x] When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

jairovg avatar Jul 11 '22 16:07 jairovg

Good approach, this will enhance user experience.

fugazi avatar Jul 11 '22 20:07 fugazi

Awesome!!

edward-montoya avatar Jul 11 '22 22:07 edward-montoya