[wp-trac] [WordPress Trac] #61081: Change <h1> Tags in TinyMCE Link Modal to <span> or Lesser Header Tags to Prevent Potential SEO Issues
WordPress Trac
noreply at wordpress.org
Thu Apr 25 22:09:39 UTC 2024
#61081: Change <h1> Tags in TinyMCE Link Modal to <span> or Lesser Header Tags to
Prevent Potential SEO Issues
---------------------------+-----------------------------
Reporter: bohdansmaha | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: TinyMCE | Version:
Severity: normal | Keywords:
Focuses: accessibility |
---------------------------+-----------------------------
== Description:
In the current implementation of the TinyMCE editor used within WordPress,
the link modal (which appears when users click to insert/edit links) is
titled using an <h1> tag. This is semantically inappropriate for a modal
header and could potentially lead to SEO issues, particularly through the
generation of multiple <h1> tags on pages where the editor is used
multiple times or alongside other content that correctly uses <h1> tags.
== Existing Code Example:
{{{
<h1 id="link-modal-title">Insert/edit link</h1>
}}}
== Problem:
Automated SEO tools and accessibility checks often flag pages with
multiple <h1> tags as having potential structure issues, which can mislead
users about the importance and hierarchy of content. Since <h1> tags are
typically reserved for primary page titles, their use in a modal for
editing links can be seen as overemphasizing the importance of the modal's
content.
== Suggested Solution:
It would be more appropriate to use either <span> tags or a lesser header
tag such as <h2>, <h3>, etc., for the headers within these modals. This
change would prevent the TinyMCE link modal from inadvertently affecting
the semantic structure of the page and improve compatibility with SEO best
practices and accessibility guidelines.
== Benefits:
* **SEO Compliance:** Reduces the risk of SEO penalties from search
engines that expect a single <h1> per page or semantic clarity in content
hierarchy.
* **Accessibility:** Improves content accessibility by maintaining a clear
and logical hierarchy in document structure, as modal titles do not
typically constitute a top-level heading on a page.
* **Editor Consistency:** Aligns the use of header tags within WordPress
admin tools with best web practices, reinforcing WordPress's commitment to
producing semantically correct and accessible content.
I suggest modifying the TinyMCE initialization or configuration files
where these modal titles are defined to change the tag from <h1> to a
<span> or an appropriate heading level that reflects the modal's purpose
without conflicting with the primary page content.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61081>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list