GoogleChrome / lighthouse

Automated auditing, performance metrics, and best practices for the web.
https://developer.chrome.com/docs/lighthouse/overview/
Apache License 2.0
28.05k stars 9.32k forks source link

layout-shifts `details.headings[n].subHeadings` is missing `valueType: 'node'` #15881

Closed hilja closed 3 months ago

hilja commented 3 months ago

FAQ

URL

https://www.nytimes.com/

What happened?

The audit with the id layout-shifts doesn’t define details.headings[n].subHeadings.valueType for the node.

{
  "more": "stuff...",
  "headings": [
    {
      "key": "node",
      "label": "Element",
      "valueType": "node",
      "subItemsHeading": {
        "key": "extra",
      }
    },
    {
      "key": "score",
      "label": "Layout shift score",
      "valueType": "numeric",
      "granularity": 0.001,
      "subItemsHeading": {
        "key": "cause",
        "valueType": "text"
      }
    }
  ],
  "more": "stuff...",
}

What did you expect?

I expected the node item to have valueType: 'node':

{
  "more": "stuff...",
  "headings": [
    {
      "key": "node",
      "label": "Element",
      "valueType": "node",
      "subItemsHeading": {
        "key": "extra",
        "valueType": "node"
      }
    },
    {
      "key": "score",
      "label": "Layout shift score",
      "valueType": "numeric",
      "granularity": 0.001,
      "subItemsHeading": {
        "key": "cause",
        "valueType": "text"
      }
    }
  ],
  "more": "stuff...",
}

What have you tried?

Run it on the provided URL.

How were you running Lighthouse?

node

Lighthouse Version

11.7.0

Chrome Version

chrome-launcher 1.1.1

Node Version

20.11.1

OS

Mac Sonoma 14.3.1 (23D60)

Relevant log output

No response

hilja commented 3 months ago

Okay, I understand it better now 😅 There are different types of subItems so the type of the sub item can't be defined on the upper level.