vue-axe
vue-axe copied to clipboard
Allow specifying root selector/element for initial report. Fix #36
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)
Good approach, this will enhance user experience.
Awesome!!