Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/small-singers-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/starlight': patch
---

Fixes HTML validity in sidebar groups by ensuring `<summary>` is the first child of `<details>`
2 changes: 1 addition & 1 deletion packages/starlight/components/SidebarSublist.astro
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const { sublist, nested } = Astro.props;
<details
open={flattenSidebar(entry.entries).some((i) => i.isCurrent) || !entry.collapsed}
>
<SidebarRestorePoint />
<summary>
<span class="group-label">
<span class="large">{entry.label}</span>
Expand All @@ -51,6 +50,7 @@ const { sublist, nested } = Astro.props;
</span>
<Icon name="right-caret" class="caret" size="1.25rem" />
</summary>
<SidebarRestorePoint />
Copy link
Member

Choose a reason for hiding this comment

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

And then remove it here:

Suggested change
<SidebarRestorePoint />

<Astro.self sublist={entry.entries} nested />
</details>
)}
Expand Down
Loading