Skip to content

infobox: wrap distribution microdata as DataDownload with encodingFormat - #1451

Merged
Flotapponnier merged 3 commits into
mainfrom
fix/infobox-distribution-encoding
Jul 25, 2026
Merged

infobox: wrap distribution microdata as DataDownload with encodingFormat#1451
Flotapponnier merged 3 commits into
mainfrom
fix/infobox-distribution-encoding

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Follow-up to PR #1450

After the microdata name/description fix (#1450), GSC now shows a non-critical warning on the same 4 URLs: 'Missing field encodingFormat (in distribution)'.

The itemProp='distribution' on bench-infobox.tsx was on a bare <a> tag → Google parsed it as a distribution with only url, no encodingFormat, no contentUrl.

Fix

Wrap in <span itemScope itemType=DataDownload> with:

  • hidden <meta itemProp='encodingFormat' content='application/json' />
  • inner <a itemProp='contentUrl'> (visible link stays, its href becomes the contentUrl)

Test plan

  • pnpm typecheck
  • After deploy: RRT on any bench page → distribution microdata has both encodingFormat and contentUrl
  • GSC Validate fix → warning drops

Florent Tapponnier added 3 commits July 25, 2026 23:44
…nvalid)

Rich Results Test 2026-07-25 flagged an 'Unnamed item' Dataset on
ws-head-latency-* + xstocks-peg. Turned out to be the microdata
Dataset declared by <aside itemScope itemType=schema.org/Dataset>
in the bench-infobox component: it exposes identifier, variableMeasured,
dateModified, license, sameAs, distribution via itemProp attributes
but was missing name, description, creator.

Google parses the microdata alongside the JSON-LD block and validates
each Dataset in isolation, so an incomplete microdata Dataset flags
even when the JSON-LD siblings are complete.

Adds hidden <meta itemProp> nodes for name/description/url/creator
so the microdata graph stays valid without adding duplicate visible
text to the human-facing infobox.
GSC follow-up flag after PR #1450 fixed the critical name/description
issue: 'Missing field encodingFormat (in distribution)' non-critical
warning on the same 4 URLs. The itemProp='distribution' was on a bare
<a> tag, which Google parsed as a distribution with only url — no
encodingFormat, no contentUrl.

Wrap in itemScope + itemType=DataDownload so the microdata declares
the proper DataDownload shape. contentUrl comes from the <a> href
via itemProp='contentUrl', encodingFormat comes from a hidden meta.
@Flotapponnier
Flotapponnier merged commit af5c219 into main Jul 25, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant