WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 8 months ago

#40264 closed defect (bug) (fixed)

Twenty Seventeen: Incorrect heading hierarchy for front page sections

Reported by: celloexpressions Owned by: swissspidy
Milestone: 4.7.4 Priority: normal
Severity: normal Version: 4.7
Component: Bundled Theme Keywords: has-patch commit fixed-major
Focuses: accessibility Cc:

Description

When the posts page is used as a front page section, it displays recent post titles. These should be a sub-level of hierarchy within the posts-page front page section. The posts-page section title is an h2, so the individual post titles should be h3.

Issue found by @joedolson in the Dynamic Seventeen theme accessibility-ready review.

Attachments (2)

40264.diff (1.0 KB) - added by celloexpressions 9 months ago.
Use h3 when the excerpt template is being used within a front page section.
40264.2.patch (5.4 KB) - added by davidakennedy 8 months ago.
When displaying regular posts on the front page, make post titles <h3> to stay within a hierarchy.

Download all attachments as: .zip

Change History (21)

@celloexpressions
9 months ago

Use h3 when the excerpt template is being used within a front page section.

This ticket was mentioned in Slack in #core by swissspidy. View the logs.


8 months ago

#2 @swissspidy
8 months ago

When displaying regular posts on the front page, i.e. not within a section, the page title ("Posts") is a <h2> while the individual post titles are <h2> as well. This patch doesn't address this, even though it basically is the same issue.

#3 follow-up: @davidakennedy
8 months ago

Good catch everyone! I missed this in the accessibility review I did.

I agree with @swissspidy that we should make this change for when posts are displayed on the front page. In this case, they'll be a <h3>, but I assume the font size should remain the same size as the <h2>s are now – so the visual hierarchy is the same. What do you think @melchoyce?

#4 in reply to: ↑ 3 @melchoyce
8 months ago

Replying to davidakennedy:

I agree with @swissspidy that we should make this change for when posts are displayed on the front page. In this case, they'll be a <h3>, but I assume the font size should remain the same size as the <h2>s are now – so the visual hierarchy is the same. What do you think @melchoyce?

This would be my ideal approach 👍

#5 @swissspidy
8 months ago

@melchoyce @davidakennedy With 4.7.4 now being planned for next Tuesday, do you think this one could be made ready for 4.7.4? We already have a few fixes for Twenty Seventeen in this release that might warrant a new version.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


8 months ago

#7 @swissspidy
8 months ago

  • Owner set to swissspidy
  • Status changed from new to assigned

#8 @swissspidy
8 months ago

  • Keywords needs-refresh added

#9 @davidakennedy
8 months ago

With 4.7.4 now being planned for next Tuesday, do you think this one could be made ready for 4.7.4?

@swissspidy I think so. Initial patch incoming. I'll take a closer look at this tomorrow morning to make sure I didn't miss anything, and have @laurelfulford review it if she can.

@davidakennedy
8 months ago

When displaying regular posts on the front page, make post titles <h3> to stay within a hierarchy.

#10 @swissspidy
8 months ago

  • Keywords needs-refresh removed

Thanks @davidakennedy! The latest patch looks good to me.

#11 @laurelfulford
8 months ago

It looks good to me, too, @davidakennedy!

#12 @swissspidy
8 months ago

  • Keywords commit added

#13 @swissspidy
8 months ago

@davidakennedy After having a second look at 40264.2.patch , why is the @version not updated in all affected template files?

Should we perhaps do such a change in a separate ticket similar to #39489?

#14 @swissspidy
8 months ago

Created a new ticket for the changelog: #40461

#15 @sami.keijonen
8 months ago

Tested the 40264.2.patch and it looks good. Not sure about the Version stuff.

Last edited 8 months ago by sami.keijonen (previous) (diff)

#16 @swissspidy
8 months ago

Alright, let's handle the version thing in #40461

#17 @swissspidy
8 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 40458:

Twenty Seventeen: Correct heading hierarchy for posts on the front page.

When the posts page is on the front page or within a front page section, the heading hierarchy for the individual post titles needs to be adjusted accordingly.

Props joedolson, celloexpressions, davidakennedy.
Fixes #40264.

#18 @swissspidy
8 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

#19 @swissspidy
8 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 40459:

Twenty Seventeen: Correct heading hierarchy for posts on the front page.

When the posts page is on the front page or within a front page section, the heading hierarchy for the individual post titles needs to be adjusted accordingly.

Props joedolson, celloexpressions, davidakennedy.
Fixes #40264.

Merges [40458] to the 4.7 branch.

Note: See TracTickets for help on using tickets.