Opened 10 years ago
Closed 10 years ago
#31027 closed enhancement (worksforme)
Twenty Fifteen: improve site title code
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.2 |
Component: | Bundled Theme | Keywords: | has-patch close |
Focuses: | Cc: |
Description
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.
Attachments (1)
Change History (7)
#2
in reply to:
↑ 1
@
10 years ago
Replying to SergeyBiryukov:
Looking at the similar code in Twenty Ten, perhaps
is_front_page() || is_home()
was the intention here.
Scratch that, the current code works as intended, per comment:18:ticket:30065. See [30072].
31027.patch removes the link if we want to do that.
#4
@
10 years ago
- Keywords close added
I don't think it's an accessibility problem to link to self on the home page. Previous default themes do this also.
I suggest closing as "worksforme".
#5
in reply to:
↑ description
@
10 years ago
As Sergey pointed out, this is how it's intended to work.
Replying to TomasM:
In fact, with current code, if you would set front page to static page, theme would not produce H1, but would render P instead.
In this case, the page title is meant to be the h1
on the site.
I personally don't see the necessity of removing the anchor.
I also suggest closing as "worksforme".
Looking at the similar code in Twenty Ten, perhaps
is_front_page() || is_home()
was the intention here.