Skip to content

Commit 9200fac

Browse files
anderskdelucis
andauthored
Convert invalid <div> child of <summary> to <span> (#3422)
Co-authored-by: Chris Swithinbank <[email protected]>
1 parent e7fd6de commit 9200fac

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.changeset/smart-rocks-battle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@astrojs/starlight': patch
3+
---
4+
5+
Refactors collapsible sidebar sections and “on this page” dropdown to use `<span>` instead of `<div>`

packages/starlight/components/MobileTableOfContents.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ const { toc } = Astro.locals.starlightRoute;
1111
<nav aria-labelledby="starlight__on-this-page--mobile">
1212
<details id="starlight__mobile-toc">
1313
<summary id="starlight__on-this-page--mobile" class="sl-flex">
14-
<div class="toggle sl-flex">
14+
<span class="toggle sl-flex">
1515
{Astro.locals.t('tableOfContents.onThisPage')}
1616
<Icon name={'right-caret'} class="caret" size="1rem" />
17-
</div>
17+
</span>
1818
<span class="display-current" />
1919
</summary>
2020
<div class="dropdown">

packages/starlight/components/SidebarSublist.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const { sublist, nested } = Astro.props;
3939
>
4040
<SidebarRestorePoint />
4141
<summary>
42-
<div class="group-label">
42+
<span class="group-label">
4343
<span class="large">{entry.label}</span>
4444
{entry.badge && (
4545
<Badge
@@ -48,7 +48,7 @@ const { sublist, nested } = Astro.props;
4848
text={entry.badge.text}
4949
/>
5050
)}
51-
</div>
51+
</span>
5252
<Icon name="right-caret" class="caret" size="1.25rem" />
5353
</summary>
5454
<Astro.self sublist={entry.entries} nested />

0 commit comments

Comments
 (0)