Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jairovg
Copy link

@jairovg jairovg commented Jul 11, 2022

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)

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

Documentation updated with the new element for the plugin config.

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

  • Yes
  • No

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

The PR fulfills these requirements:

  • 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 added 3 commits July 8, 2022 12:20
This element will be used as the default context sent to `axe.run`

Fix: vue-a11y#36
…oint

It runs the audit against `document` with the manual run to check against an injected bug in the page head
@fugazi
Copy link

fugazi commented Jul 11, 2022

Good approach, this will enhance user experience.

@edward-montoya
Copy link

Awesome!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow specifying root selector/element for initial report
3 participants