-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Option to set title for the Table of Contents block #52378
Copy link
Copy link
Open
Labels
[Block] Table of contents (experimental)Affects the Table of contents BlockAffects the Table of contents Block[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).Changes that impact accessibility and need corresponding review (e.g. markup changes).[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Description
What problem does this address?
There is no good way of setting a title for the Table of Contents block
What is your proposed solution?
Option to set a title for the Table of Contents block, something like this:
And this as HTML:
<nav class="wp-block-table-of-contents">
<!-- POSSIBILITY TO ADD THIS: -->
<h2 class="wp-block-table-of-contents__title">Contents on this page:</h2>
<ol>
<li>
<a class="wp-block-table-of-contents__entry" href="https://test.local/#heading-page-1">heading page 1</a>
</li>
<li>
<a class="wp-block-table-of-contents__entry" href="https://test.local/#heading-page-2">heading page 2</a>
</li>
<li>
<a class="wp-block-table-of-contents__entry" href="https://test.local/#heading-page-3">heading page 3</a>
</li>
</ol>
</nav>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Block] Table of contents (experimental)Affects the Table of contents BlockAffects the Table of contents Block[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).Changes that impact accessibility and need corresponding review (e.g. markup changes).[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Type
Fields
Give feedbackNo fields configured for issues without a type.
