[wp-trac] [WordPress Trac] #31027: Twenty Fifteen: improve site title code

WordPress Trac noreply at wordpress.org
Thu Jan 15 21:41:33 UTC 2015


#31027: Twenty Fifteen: improve site title code
---------------------------+-----------------------------
 Reporter:  TomasM         |      Owner:
     Type:  enhancement    |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Bundled Theme  |    Version:  trunk
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 Looking from the accessibility standpoint it would make sense to remove
 the link from H1. Ref.: http://blog.rrwd.nl/2014/11/21/html5-headings-in-
 wordpress-lets-fight/#comment-6970

 ''"On the homepage the logo or site title can be put into an H1. This is
 not a link, because that will be a link to the page itself."''


 {{{
 <h1 class="site-title"><?php bloginfo( 'name' ); ?></h1>
 }}}

 Another thing, IF statement doesn't need to check:

 {{{
 is_front_page() && is_home()
 }}}

 because is_front_page is sufficient. Ref. Codex:

 ''"On the site front page, is_front_page() will always return TRUE,
 regardless of whether the site front page displays the blog posts index or
 a static page."''

 In fact, with current code, if you would set front page to static page,
 theme would not produce H1, but would render P instead.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31027>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list