[wp-trac] [WordPress Trac] #48126: Duplicate <h1> tags in twentynineteen

WordPress Trac noreply at wordpress.org
Thu Sep 26 15:27:41 UTC 2019


#48126: Duplicate <h1> tags in twentynineteen
---------------------------+----------------------------
 Reporter:  williampatton  |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  5.3
Component:  Bundled Theme  |     Version:  trunk
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:  accessibility
---------------------------+----------------------------

Comment (by adamsilverstein):

 @williampatton Do you have any more details/steps to reproduce? I was
 unable to reproduce this in twentynineteen, are you sure this is an issue?

 I tried to reproduce by setting the homepage to a page, when I visited the
 page title was wrapped in an `h1` while the site title was wrapped in `<p
 class="site-title">`

 Checking the code I see we check:

 `is_front_page() && is_home()` before outputting an `h1` - which should
 only be true when the homepage shows the latest posts in my testing. maybe
 I am missing some setup step?

 And in the docs I found that:

 is_home `If a static page is set for the front page of the site, this
 function will return true only on the page you set as the "Posts page".` I
 verified this is correct, even when i set both the posts and home page to
 the same page, I couldn't get both conditions to be true.

 Can you please add exact details about how do you create a condition where
 you get double `h1`s and verify this in fact happens in twentynineteen?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48126#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list