Fix a Poor Interaction to Next Paint Measured From Real Users

Field Vitals Analyzer

What is this warning?

Chrome's field data shows that interactions on this page — clicks, taps and key presses — take more than 500 milliseconds to produce a visible response for at least a quarter of real visits. The page fails Google's Interaction to Next Paint assessment. INP is caused by JavaScript occupying the main thread when the user acts, or by an event handler that does too much work before the browser can paint.

How to Fix This Issue

How to Fix It

The Problem

An event handler does all of its work synchronously, so the browser cannot paint any feedback until it finishes:

button.addEventListener('click', () => {
  recalculateEverything();   // 400ms of work
  renderResults();
});

The Solution

Show feedback first, then yield to the browser before doing the heavy work. Break long tasks up, defer third-party scripts, and move non-visual work off the main thread:

button.addEventListener('click', async () => {
  button.classList.add('is-busy');           // paints right away
  await scheduler.yield?.() ?? new Promise(r => setTimeout(r));
  recalculateEverything();
  renderResults();
});

Why This Works

INP measures the delay until the next frame after an interaction. The browser can only paint between tasks, so a long task after a click holds the screen still. Yielding lets the acknowledgement paint immediately, which is the moment INP stops counting.

SEO Impact

This issue can affect your site's search engine rankings and user experience. Addressing it promptly helps ensure optimal performance and visibility in search results.

Automatic Detection

bseoa automatically checks for this warning during site analysis, along with hundreds of other technical SEO issues.

Other Field Vitals Analyzer issues

Ready to Unlock Your Site's Full SEO Potential?

Choose the license that fits your needs and start getting the deep, actionable insights you deserve.