Make WordPress Core

Opened 4 years ago

Closed 5 months ago

Last modified 5 months ago

#49438 closed defect (bug) (wontfix)

Twenty Twenty: h1 when is_front_page() is a static page

Reported by: sgr33n's profile SGr33n Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.3
Component: Bundled Theme Keywords: has-patch reporter-feedback
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Hi,
I see that template-tags.php doesn't assign the h1 to the site title correctly when you assign a static page to the front page.

It's due to the code
'condition' => ( is_front_page() || is_home() ) && ! is_page()

is_page(), infact, returns true on is_front_page() in that case.

I suppose it should be:

'condition' => is_front_page() || ( is_home() && ! is_page() )

Diff patch attached.

Attachments (1)

h1-is_home.patch (511 bytes) - added by SGr33n 4 years ago.

Download all attachments as: .zip

Change History (6)

@SGr33n
4 years ago

#1 @SergeyBiryukov
4 years ago

  • Description modified (diff)

#2 @ianbelanger
4 years ago

  • Keywords reporter-feedback added
  • Version changed from trunk to 5.3

I tested Twenty Twenty with a static page set as the homepage and I am seeing the page title as an H1. @SGr33n Could you please confirm that you are still seeing an issue?

#3 @SGr33n
4 years ago

Hi @ianbelanger,
It's not the page title. On the home page, according to SEO, the correct H1 should be the site title, or the site logo. It's the same behavior we had on earlier themes.

#4 follow-up: @poena
5 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

That the page title is the H1 is intentional. When it is possible, the H1 should be the main heading of the page, describing the content below it. It is important for making the content accessible.
It does not damage SEO.

The headings are not comparable with older default themes because SEO best practices has changed and the accessibility awareness in the WordPress project has increased over time.

#5 in reply to: ↑ 4 @SGr33n
5 months ago

Replying to poena:

The headings are not comparable with older default themes because SEO best practices has changed and the accessibility awareness in the WordPress project has increased over time.

It was a 4 years old ticket 😋 It isn't actual anymore. Everything changed in 4 years 😅

Note: See TracTickets for help on using tickets.