layout-instability icon indicating copy to clipboard operation
layout-instability copied to clipboard

focus on high priority elements

Open souders opened this issue 6 years ago • 1 comments

There are lots of rendering metrics that should be ignored because they give every pixel in the page the same weight, even though we know that site owners and users focus on high priority pixels like headlines and hero images. Largest Contentful Paint is a great move of applying heuristics in an attempt to measure the rendering of pixels that matter.

I think the same should be considered for Layout Instability. Personally, I most notice layout jank when I'm reading the main content of a page: headlines, hero images (or more often the caption under a hero image of news sites), and lead paragraphs. Some of these would be hard to identify (eg, lead paragraph), but headlines and hero images could be identified using logic similar (identical?) to that used for Largest Contentful Paint.

True, true - it is inelegant when a social media widget or ad has a layout shift, but I don't think that matters as much to site owners and users as layout instability related to the critical content in the page.

Could we get a version of Layout Instability that focused on critical content?

souders avatar Jun 05 '19 20:06 souders

I agree with the observation that users care more about "critical content" like headlines and hero images. I expect we will learn a lot from LCP about how to identify this type of content. It's possible some of that logic could be reused by the layout stability algorithm.

On the other hand, layout stability already gives priority to these elements to some degree, by considering the size of the impact region. Where the critical content occupies a larger visual area than the non-critical ads and widgets, layout shifts affecting the critical content will be penalized to a proportionately greater extent.

Where a page has non-critical ads and widgets that both experience layout shifts and occupy a larger visual area than the critical content... I think we should penalize that too.

skobes-chromium avatar Jun 18 '19 19:06 skobes-chromium