[wp-trac] [WordPress Trac] #48126: Twenty Nineteen: Duplicate <h1> tags

WordPress Trac noreply at wordpress.org
Sat Sep 28 18:12:22 UTC 2019


#48126: Twenty Nineteen: Duplicate <h1> tags
---------------------------+------------------------------
 Reporter:  williampatton  |       Owner:  adamsilverstein
     Type:  defect (bug)   |      Status:  assigned
 Priority:  normal         |   Milestone:  5.3
Component:  Bundled Theme  |     Version:  trunk
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:  accessibility
---------------------------+------------------------------

Comment (by sabernhardt):

 @adamsilverstein Well, no, my suggestion of simply removing `is_home()`
 does not work in all cases. If I use the child theme scenario I mentioned
 earlier, then switch back to the default home page of posts without
 editing/removing the home.php template, I end up with an empty `h1` on the
 home page plus the site-title `h1`. (Even though this is an edge case, it
 does show there's a way to break it.)

 I can test for another way to fix child theme scenarios, but we should
 also consider whether the original *needs* fixing. Twenty Fifteen and
 Twenty Sixteen use the same `if ( is_front_page() && is_home() )` logic in
 their `header.php` files. That seems to give the site-title a heading tag
 only in the intended case of a blog-style home page, and I have not seen
 any different in Twenty Nineteen either. It's also described as the
 "right" way to target the default homepage template in this Stack Exchange
 answer:
 https://wordpress.stackexchange.com/questions/224592/if-is-home-is-front-
 page#239838

 Can anyone describe an extra `h1` instance with (the unpatched) Twenty
 Nineteen so we can test whether a patch fixes that scenario first?
 Understanding the problem would be worth more than my hypothetical
 situations :).

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


More information about the wp-trac mailing list