Skip to content

Conversation

@toastal
Copy link
Contributor

@toastal toastal commented Jun 21, 2025

https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element

Description list allow <div> & script-supporting elements—not just <dd> & <dt> elements.

1

Footnotes

  1. Please consider giving up MS GitHub or offering a non-proprietary, non-US-corporate-controlled mirror for this free software project. I wish to delete this Microsoft account in the future, but I need more projects like this to support alternative methods to send patches & contribute.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the HTML type definitions to align with the WHATWG HTML specification for the <dl> (description list) element, allowing more flexible content models as specified in the HTML standard.

Key changes:

  • Introduces a new script_supporting type for script-supporting elements (<script> and <template>)
  • Allows <div> and script-supporting elements as direct children of <dl> elements
  • Allows <dd> and <dt> elements as children of <div> elements (specifically when <div> is used within <dl>)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
lib/html_types.mli Adds script_supporting type and updates dl_content, dl_content_fun, div_content, and div_content_fun to implement the WHATWG HTML spec for description lists
CHANGES.md Documents the changes in the changelog

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@toastal toastal force-pushed the dl-div branch 2 times, most recently from 5083f92 to ac57f24 Compare December 1, 2025 17:55
> Content model:
>	Either: Zero or more groups each consisting of one or more dt elements followed by one or more dd elements, optionally intermixed with script-supporting elements.
> 	Or: One or more div elements, optionally intermixed with script-supporting elements.

— https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants