Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding heading to TOC #68805

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open

Conversation

benazeer-ben
Copy link
Contributor

@benazeer-ben benazeer-ben commented Jan 21, 2025

What?

Fixes : #52378

Why?

There is no good way of setting a title for the Table of Contents block

How?

Added settings to include title for the Table of Content block.

Testing Instructions

  • Open a post or page.
  • Insert a heading block.
  • Check the settings added to include title for the block.
  • Verify the title is displaying properly in editor and frontend.

Screenshots or screencast

Before After
Screenshot (4) Screenshot (5)

Copy link

github-actions bot commented Jan 21, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: benazeer-ben <[email protected]>
Co-authored-by: carolinan <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: afercia <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: alexstine <[email protected]>
Co-authored-by: 00travelgirl00 <[email protected]>
Co-authored-by: huubl <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@Mamaduka Mamaduka added [Type] Enhancement A suggestion for improvement. [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Block] Table of contents (experimental) Affects the Table of contents Block labels Jan 22, 2025
@benazeer-ben
Copy link
Contributor Author

benazeer-ben commented Feb 12, 2025

Could someone review this PR when available? @Mamaduka @ajitbohra @fabiankaegy

Let me know if you'd like any further refinements!

Thanks in advance!

@benazeer-ben
Copy link
Contributor Author

Hi Team,

Whenever you have some time, could you please review this PR? I’d really appreciate your feedback.

Thanks in advance!

cc: @t-hamano @carolinan

@carolinan
Copy link
Contributor

Hi, the table of content block is still experimental, personally I am not able to prioritise it.

@t-hamano
Copy link
Contributor

t-hamano commented Mar 7, 2025

Thanks for the PR!

From reading the issue, it seems like the current TOC block needs some improvement from an accessibility perspective, so simply adding an h2 heading option might not be the best solution.

Before proceeding with implementation, it is a good idea to consider what specification would be the ideal approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Table of contents (experimental) Affects the Table of contents Block [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to set title for the Table of Contents block
4 participants