0

Google's Lighthouse tests for CWV ran on my website include an issue stating that touch and wheel event listeners are not marked as passive.

How and where to fix this? I have tried to check my file manager in cms but I can't find it. I am using a theme. Screenshot from Pagespeed Webdev test

3
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Jul 14, 2023 at 21:32
  • I've added context to the question, to state where it is occurring. If the edit can be approved and the question re-opened, I can answer it. Commented Jul 17, 2023 at 10:44
  • 1
    @GeoffAtkins I've reopened this so you can add an answer - thanks. Commented Jul 17, 2023 at 21:56

1 Answer 1

1

Passive Listeners aren't a setting within your website or on your server, they're a feature within JavaScript that improves performance for touch scrolling or mouse-wheel scrolling for your website.

Lighthouse (Google's tool for letting us measure Core Web Vitals) highlights not using them as a potential performance issue, but it doesn't actually impact any of the key metrics (FCP, LCP, TBT, CLS). Lack of passive listeners do make performance slightly worse for some users when using your page, and if possible it is best practice to implement them. There are videos on YouTube that show the performance difference on a mobile phone, with a side-by-side demonstration.

You mention using a theme. Which I presume means you're using a CMS of some form. This means it's almost certain that your theme or one of the plugins for your CMS is using an older JavaScript library (most probably a dated jQuery version). Finding which plugin it is that's using it and making sure it's fully up to date might fix it. Of course, it's best practice to make sure your CMS, as well as any themes and plugins, are kept up to date as much as possible.

Alternatively, it is possible it might be a third party system connected to your website. My agency has stopped using a third party Cookie Consent system for exactly this reason. It included an old version of jQuery which causes this issue to be highlighted when testing our own websites. It doesn't actually impact performance on the website (because no part of the cookie consent system involves scrolling) but we have moved away from it nonetheless. Whether resolving this issue had any positive effects to our SEO performance is questionable and any benefit was very, very marginal.

Lighthouse (whether used within Google Chrome's developer tools, or through https://pagespeed.web.dev/) will tell you which script is causing the problem, and some investigation using developer tools will let you know what on your website is calling the affected script. This will at least point you in the right direction for resolving this issue.

This question on Stack Overflow shows how to implement passive listeners, and if you are a developer yourself (or you employ one), you could manually implement this fix. However, for a CMS this might be difficult and your hard work might be overwritten by a forthcoming update.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.