Skip to content

Complete the HTML content models: meta itemprop, details name, script-supporting elements - #382

Merged
balat merged 5 commits into
masterfrom
html-flow-content-extras
Aug 28, 2026
Merged

Complete the HTML content models: meta itemprop, details name, script-supporting elements#382
balat merged 5 commits into
masterfrom
html-flow-content-extras

Conversation

@balat

@balat balat commented Aug 28, 2026

Copy link
Copy Markdown
Member

Three small additions left over from the triage of the open pull requests, plus one bug found on the way.

meta with itemprop in phrasing content (#343 by @toastal)

The specification allows meta wherever phrasing content is expected when it carries an itemprop attribute. A dedicated meta_itemprop constructor and a `Meta_with_itemprop type tag encode that, so a plain meta stays 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 `Meta tag 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 meta tag to meta, 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.

name on details (#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

script and template are allowed among the children of ol, ul, table and its row groups, tr, select and optgroup. This finishes what #344 started for dl. As in the fix for #379, only the _content_fun types are widened; the _content types stay closed for reverse dependencies.

Fix: the li children of menu were unusable

Found while adding the above. The `Lis branch of menu ~children required an li whose attributes were a subset of common, but li always carries li_attrib, which adds `Int_Value. No li value could satisfy it, so that branch was dead. It now accepts li_attrib.


Tests: 429 green (56 + 52 + 200 ppx + 121 jsx). dune build @check, dune build @doc, make build and make test all pass.

balat added 5 commits August 28, 2026 13:46
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.
@balat
balat merged commit e0cc723 into master Aug 28, 2026
8 checks passed
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