Complete the HTML content models: meta itemprop, details name, script-supporting elements - #382
Merged
Conversation
The specification allows meta wherever phrasing content is expected when it carries an itemprop attribute. Add a dedicated constructor and type tag so that only that form is accepted there, leaving plain meta metadata-only.
It groups several details elements into an exclusive accordion.
…t models The specification allows script and template among the children of ol, ul, table, thead, tbody, tfoot, tr, select and optgroup. Only the _content_fun types are widened; the _content types stay closed for reverse dependencies.
The `Lis branch required [< common] attributes on its li children, but li always carries li_attrib, which adds `Int_Value, so no li could be passed. Accept li_attrib, and the script-supporting elements while we are here.
This was referenced Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three small additions left over from the triage of the open pull requests, plus one bug found on the way.
metawithitempropin phrasing content (#343 by @toastal)The specification allows
metawherever phrasing content is expected when it carries anitempropattribute. A dedicatedmeta_itempropconstructor and a`Meta_with_itemproptype tag encode that, so a plainmetastays metadata-only.This takes the part of #343 that was still missing: its microdata attributes are already in master. It differs from #343 in one point: #343 also added the bare
`Metatag to the phrasing content models, which would have allowed<meta charset>inside a<p>.Known limitation: the PPX and the JSX syntax still map the
metatag tometa, so<meta itemprop=...>cannot be written there in a phrasing position. Tag dispatch on the presence of an attribute is not something the reflection machinery can express today.nameondetails(#341 by @SylvainBoilard)Groups several disclosure widgets into an exclusive accordion. This is the part of #341 that was still missing: its popover support is already in master.
Script-supporting elements in the remaining content models
scriptandtemplateare allowed among the children ofol,ul,tableand its row groups,tr,selectandoptgroup. This finishes what #344 started fordl. As in the fix for #379, only the_content_funtypes are widened; the_contenttypes stay closed for reverse dependencies.Fix: the
lichildren ofmenuwere unusableFound while adding the above. The
`Lisbranch ofmenu ~childrenrequired anliwhose attributes were a subset ofcommon, butlialways carriesli_attrib, which adds`Int_Value. Nolivalue could satisfy it, so that branch was dead. It now acceptsli_attrib.Tests: 429 green (56 + 52 + 200 ppx + 121 jsx).
dune build @check,dune build @doc,make buildandmake testall pass.