Skip to content

Commit a749136

Browse files
Docs: enhance 'On this page' ToC accessibility (#41483)
Co-authored-by: Julien Déramond <[email protected]>
1 parent 1c3b53b commit a749136

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

site/src/layouts/DocsLayout.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ if (frontmatter.toc) {
9797
<use xlink:href="#chevron-expand" />
9898
</svg>
9999
</button>
100-
<strong class="d-none d-md-block h6 my-2 ms-3">On this page</strong>
100+
<strong class="d-none d-md-block h6 my-2 ms-3" id="docs-tocs">On this page</strong>
101101
<hr class="d-none d-md-block my-2 ms-3" />
102102
<div class="collapse bd-toc-collapse" id="tocContents">
103-
<nav id="TableOfContents">
103+
<nav id="TableOfContents" aria-labelledby="docs-tocs">
104104
<TableOfContents headings={headings} />
105105
</nav>
106106
</div>

0 commit comments

Comments
 (0)