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

Console errors: Cannot read property 'violations' of undefined -- Nuxt #32

Open
tylergrow opened this issue Sep 2, 2020 · 15 comments
Open

Comments

@tylergrow
Copy link

tylergrow commented Sep 2, 2020

Seeing two errors come up on Nuxt over and over despite following documentation for installing.

Everything seems to be working okay, but I see two errors on each page after refreshing:

Image of the console errors thrown

image

My best guesses for these errors

The first issue appears (Cannot read property 'violations' of undefined from vue-axe.esm.js) to be related to vue-axe.

The second is coming from axe.js (Uncaught (in promise) Error: No elements found for include in page Context). From what I can tell, this isn't the axe.js file in plugins/axe.js. Of course, I could be mistaken.

Attempted troubleshooting

I deleted alt text from an image and saved it; after a hot reload the errors do not log, but if I then refresh the page they are logged.

Console after running env in dev

First run of page - Image has alt text
image

After saving without alt on image

Hot reloaded page - removed alt text and saved
image

Then after refreshing

Not a hot reload - still no alt text
image

On the bright side

Besides those console errors, everything else seems to work great!!

Help me help you

Sorry if my issue lacks info. (I'm not the main dev on our small team, and my knowledge of Nuxt and Vue-Axe could use improvement -- obviously). If I can provide more info or logs, let me know.

Side note

Accessibility is a top priority for our team (WCAG AA 2.1), and I would love to get this implemented to save our devs time and provide them with an awesome resource. I'm certified in WCAG through WebAIM, but your plugin is a better resource than me :).

@tylergrow tylergrow changed the title Nuxt console errors: Cannot read property 'violations' of undefined Console errors: Cannot read property 'violations' of undefined -- Nuxt Sep 2, 2020
@service-paradis
Copy link

Just wanted to say that I got the same errors using Vue.

@ktquez
Copy link
Member

ktquez commented Sep 16, 2020

@skillstruck @service-paradis

I'm sorry for answering so late.

I am working on the new version of vue-axe, and I believe that I have already discovered the problem.

Soon I will upload a correction for the current version.

I will notify you here when the correction is available.

Thank you all.

@simondib
Copy link

simondib commented Dec 4, 2020

@ktquez Any update on this fix?

@lucas-caponi-playkids
Copy link

I'm with this problem too using it with Nuxt.js

@ktquez
Copy link
Member

ktquez commented Dec 8, 2020

I'm sorry for not paying attention to this issue before, but I have been busy for the past few months.
I'll check it out this week and as soon as it's resolved I'll let you know here.

@ktquez
Copy link
Member

ktquez commented Dec 11, 2020

I made some changes based on the vue-axe-next, then tested it on a nuxt project and did not receive any more errors.
Please, test again using v2.4.4 and if the errors on the console stop, give us feedback here.

Thanks

@simondib
Copy link

@ktquez I just tested the latest package and the issue appears fixed - thanks!

@simondib
Copy link

@ktquez Sorry, I spoke too soon -- still seeing occasionally seeing these 'violation' errors.

@123survesh
Copy link

123survesh commented Dec 22, 2020

I too am facing this issue, I am using vue-axe (2.4.4) and axe-core (4.1.1).

This happens to me in a page where I have an ajax call,

  1. First the page loads and Vue-axe prints the corresponding issues in the console.
  2. Then when the ajax call's response comes in and the UI changes, the console is cleared and I get this error message.

@darrinmn9
Copy link
Contributor

I also get this error alot. It happens 100% of the time if I open and then close a modal (im using the Modal component from BootstrapVue). I am not using Nuxt, just a client-side SPA scaffolded via vue-cli.

@ktquez
Copy link
Member

ktquez commented Feb 1, 2021

Hi guys, thanks for feedback.
This week I will update vue-axe for Vue 2 and from the next version a more friendly popup will be used. See demo

@lucas-caponi-playkids
Copy link

Some update for this?

@ktquez
Copy link
Member

ktquez commented Mar 3, 2021

Sorry @lucas-caponi-playkids

I should have already finished this issue.
At the beginning of the year, my father passed away, and it impacted me a lot.
I promise to return as soon as possible and launch the new version of vue-axe for Vue 2.

@darrinmn9
Copy link
Contributor

I'm so sorry to hear that @ktquez, make sure you take as much time as you need to focus on the things that matter in life! this issue can obviously wait.

@nmackey
Copy link

nmackey commented Jun 28, 2021

Any updates on this? I'm still seeing the issue that @123survesh detailed above.

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

No branches or pull requests

8 participants