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

Viewport audit does not flag for initial-scale < 1 #15266

Closed
2 tasks done
tunetheweb opened this issue Jul 13, 2023 · 4 comments · Fixed by #15394
Closed
2 tasks done

Viewport audit does not flag for initial-scale < 1 #15266

tunetheweb opened this issue Jul 13, 2023 · 4 comments · Fixed by #15394
Assignees

Comments

@tunetheweb
Copy link
Member

FAQ

URL

https://pro-truck.com/

What happened?

(Note related to #12884 )

This has the following meta viewport in the HTML:

<meta name="viewport" content="width=device-width, initial-scale=0.9">

The initial-scale=0.9 causes the 300 second tap delay impacting FID and INP as noted in this recent blog post: https://www.phpied.com/fixing-inp-with-a-viewport-tag/

The current audit checks isMobileOptimized which only checks for the presence of initial-scale:

const isMobileOptimized = Boolean(viewportProps.width || viewportProps['initial-scale']);

We should enhance that to also check that the initial-scale is not < 1 as that also triggers the slowness.

What did you expect?

Audit should fail

What have you tried?

Details above.

How were you running Lighthouse?

PageSpeed Insights

Lighthouse Version

10.3.0

Chrome Version

114

Node Version

N/A

OS

N/A

Relevant log output

https://pagespeed.web.dev/analysis/https-pro-truck-com/wohl517q6h?form_factor=mobile
@adamraine
Copy link
Member

Interesting, didn't realize this was dependent on the scale value. I do wonder if this change makes sense for SEO ranking as well though.

If our SEO advice is slightly different from our perf advice then we will need two different audits for this now.

@tunetheweb
Copy link
Member Author

FYI, @yoavweiss dug this up from the Chrome code

I do wonder if this change makes sense for SEO ranking as well though.

If our SEO advice is slightly different from our perf advice then we will need two different audits for this now.

Given that Search is retiring the mobile friendly test and leaving it up to other tools (they recommend Lighthouse!), maybe it's time to remove it from SEO audit at same time and therefore avoid any conflict or duplication of audits?

@adamraine
Copy link
Member

We are going to do this, we are not so concerned about the effects on the SEO category.

https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/speed/metrics_changelog/2021_05_fid.md

@paulirish
Copy link
Member

our current check is this:

    const isMobileOptimized = Boolean(viewportProps.width || viewportProps['initial-scale']);

we can change it to see if initial-scale is truthy and a number >= 1.

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

Successfully merging a pull request may close this issue.

5 participants