Opened 22 months ago
Closed 22 months ago
#6745 closed defect (bug) (fixed)
Documentation: Headings linked to from table of contents anchor links need unique ids
Reported by: | zoonini | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Developer Hub | Keywords: | |
Cc: |
Description
In the newly redesigned Documentation section (including the Developer Hub), there is an "In this article" table of contents box at the top right.
The Issue
So far in my testing, none of those links seems to be working – clicking the links in the table of contents does nothing.
Example of an anchor link in the "In this article" TOC on the "Debugging in WordPress" page:
https://wordpress.org/documentation/article/debugging-in-wordpress/#debugging-plugins
The problem seems to stem from the fact that the heading tags referenced by the anchor links don't each have unique id. For example:
<h2 class="wp-block-heading">Debugging Plugins</h2>
Whereas shouldn't it be:
<h2 class="wp-block-heading" id="debugging-plugins">Debugging Plugins</h2>
Note
Please note that I chose the "Developer Hub" component from the dropdown, but the issue seems to affect multiple areas within the new Documentation area, so please feel free to adjust if there's a better, broader one (HelpHub?).
Table of contents