You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The autogenerated HTML anchors introduced in Gutenberg 11.8 can create conflicts in some instances, like when duplicating Heading blocks or when users manually set an id, as it is not checked whether the same HTML ID exists on the page.
What is your proposed solution?
Adding a prefix to the anchors with the block name would avoid most conflicts with manually set IDs, except for particular situations. It would not prevent duplicate HTML IDs if two or more headings contain the same text, which semantically is not ideal anyway. Some options to consider:
Adding a block name prefix (header-mytitle)
Adding the block name and heading level (header-h3-mytitle): this can prevent conflicts between different heading levels with the same block, but the anchor would change if the user changes the heading level.
In any case, this prefix should be customizable with the help of a hook.
The text was updated successfully, but these errors were encountered:
What problem does this address?
The autogenerated HTML anchors introduced in Gutenberg 11.8 can create conflicts in some instances, like when duplicating Heading blocks or when users manually set an id, as it is not checked whether the same HTML ID exists on the page.
What is your proposed solution?
Adding a prefix to the anchors with the block name would avoid most conflicts with manually set IDs, except for particular situations. It would not prevent duplicate HTML IDs if two or more headings contain the same text, which semantically is not ideal anyway. Some options to consider:
header-mytitle
)header-h3-mytitle
): this can prevent conflicts between different heading levels with the same block, but the anchor would change if the user changes the heading level.In any case, this prefix should be customizable with the help of a hook.
The text was updated successfully, but these errors were encountered: