#46918 closed defect (bug) (invalid)
Link Modal Dialog of Editor adds H1-tag to site
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 4.5 |
Component: | Editor | Keywords: | has-patch 2nd-opinion |
Focuses: | accessibility | Cc: |
Description
Hello everyone,
if the WordPress-editor is used on the front-end by calling the wp_editor() function (e.g. for the comments-area or somewhere else inside a plugin), a H1 headline-tag is added to the end of the HTML-sourcecode.
This tag is part of the editors modal-dialog for inserting/editing a link as shown in the following image:
The modal-dialog is hidden by default and only visible when editing a link. The H1 headline-tag gets generated inside the wp_link_dialog() function of the _WP_Editors class.
I use the WordPress-editor inside my Asgaros Forum-plugin and got a couple of reports from users about this issue in the past (examples: 1, 2). The main concern is that multiple H1 headline-tags may have a negative impact in regards to SEO.
In my oppinion there is no good reason for using a H1 headline-tag for the title of this modal-dialog because it is not related to the content of the page. As an alternative a DIV-tag could be used instead to solve this issue.
Attachments (1)
Change History (13)
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
6 years ago
#3
follow-up:
↓ 8
@
6 years ago
- Keywords reporter-feedback added
Discussed during today's accessibility bug-scrub. Most of the modals in WordPress use a h1, including the Gutenberg ones. That’s a pretty common pattern for modals because when the modal opens, its content is supposed to be the only perceivable content in a page. Omitting the heading would be equivalent to put content in a page without headings.
Granted, the WordPress modals need many more improvements :) For reference, here's an example from the W3C: https://www.w3.org/TR/wai-aria-practices-1.1/examples/dialog-modal/dialog.html
@Asgaros we're not sure we understand the concern here. The heading is hidden, search engine crawlers should just ignore it. Do you have data or other evidence the hidden heading is causing problems for SEO?
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
6 years ago
#6
@
6 years ago
- Keywords reporter-feedback close removed
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
I'm going to close this one out due to lack of reporter feedback. @Asgaros if you are able to provide more details to clarify, please do reopen.
#7
@
4 years ago
Прошло два года, а никто так ничего и не починил? Что это за отношение к своему детищу? Это же грубая ошибка, мне все SEO анализаторы выдают ошибку о двух H1
#8
in reply to:
↑ 3
@
4 years ago
У меня есть доказательства, https://ahrefs.com/ показывает ошибки вот фото https://aliprofi.ru/foto/img/2021-06/28/myjsu0u5a4apgdt16ewaqs7ej.jpg
Replying to afercia:
Discussed during today's accessibility bug-scrub. Most of the modals in WordPress use a h1, including the Gutenberg ones. That’s a pretty common pattern for modals because when the modal opens, its content is supposed to be the only perceivable content in a page. Omitting the heading would be equivalent to put content in a page without headings.
Granted, the WordPress modals need many more improvements :) For reference, here's an example from the W3C: https://www.w3.org/TR/wai-aria-practices-1.1/examples/dialog-modal/dialog.html
@Asgaros we're not sure we understand the concern here. The heading is hidden, search engine crawlers should just ignore it. Do you have data or other evidence the hidden heading is causing problems for SEO?
#9
@
2 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
Hello,
I'm reopening this because I have also alerts from a SEO plugins (@seopress) that I have 2 H1 heading in my page and this is not good for SEO and accessibility.
I'm not enough SEO & accessibility expert to know if it's true or not.
ping @rainbowgeek
#11
@
2 years ago
- Resolution set to invalid
- Status changed from reopened to closed
Hi @sebastienserre. The H1 within the modal dialog is needed for accessibility reasons.
Regarding SEO concerns, it is worth nothing that:
- When the modal dialog is closed, it is hidden with
display: none
. Search engines should not take into consideration hidden content. - When the modal dialog is (temporarily) open, there may be more than one H1 on the page. This is fine from an SEO perspective.
- From an accessibility perspective, when the modal dialog is open, its content is supposed to be the only perceivable content on the page. That's the reason why the modal dialog needs a heading and it needs to be a H1.
In this episode of Ask Google Webmasters, John Mueller (Senior Search Analyst / Search Relations team lead at Google) explains very well that multiple H1 headings are fine:
https://www.youtube.com/watch?v=zyqJJXWk0gk
I'd tend to think the SEO plugin you're using is reporting a false positive.
I hope this helps to answer your concern.
I'm going to close again this ticket as it's not an issue. Reminder that conversations can continue on closed tickets.
Introduced in [36991].