-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Description
Updated February 6 2025.
This issue only occurs when a block theme is active.
When you edit content in the block editor and enable the option "Show template", the document outline only shows the heading blocks that are in the template, not the content.
This was reported in #68684 (comment)
- The accessibility feature that presents the incorrect heading levels and duplicate H1's does not work since it does not show the result for the complete page.
- As a user, I do not feel re-assured that the heading levels are correct.
- As a user, I find it confusing that when the template is showing, I can add and edit headings in the content and the outline does not change.
Step-by-step reproduction instructions
Activate a block theme and Gutenberg trunk.
Create a new post or page.
Make sure that the "Show template" option is enabled. This option is located under the "View" icon in the top toolbar.
In the content, add two H1 heading blocks.
Open the Document Overview, and select the Document Outline tab.
Confirm that the headings you added to the content are not listed. Depending on the active theme, there may be headings from the template visible in the list.
Screenshots, screen recording, code snippet
The block editor with "Show template" enabled.
There are two H1 heading blocks in the content, but the outline is showing two H2 headings from the template:
Summary of feedback in the comments:
- Not showing the headings that the user can clearly see in the content, feels broken.
- It is a document level tool, it should detect document-level headings.
- There is a risk of duplicate H1's. Even if the template contains an h1 heading, the user may try to use an h1 heading again in the content.
Suggested solution:
When the option show template is enabled, the outline should display headings from both the template and the content.
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure