About This HTML Issue
The first child of a <details> element must be a <summary>, and this error means the validator found something else there, or nothing at all.
The <summary> is the visible label of the disclosure widget, the part people click or tab to when they want to open or close the rest of the content. If it's missing, browsers make up a label of their own, usually "Details" in the browser's language. That tells sighted users and screen reader users nothing about what's inside.
A <summary> only counts when it comes first. Comments and whitespace before it are fine, but any element or text pushes it out of place. A <summary> after a paragraph, or wrapped in a <div>, leaves the <details> without one, and the validator adds a second error for the misplaced element: Element “summary” not allowed as child of element “details” in this context. (or … child of element “div” …). A second <summary> in the same <details> gets that error too.
Sometimes <details> ends up as a plain wrapper, for example around anchor targets or layout blocks, when nobody meant to build a collapsible section. In that case, replace it with a <div> or <section>. Otherwise, add a short <summary> as the first child, or move the existing one to the top.
Invalid example
<details>
<p>Orders ship within two business days.</p>
</details>
<details>
<p>Unused items can be returned within 30 days.</p>
<summary>Returns</summary>
</details>
Valid example
<details>
<summary>Shipping</summary>
<p>Orders ship within two business days.</p>
</details>
<details>
<summary>Returns</summary>
<p>Unused items can be returned within 30 days.</p>
</details>
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.