Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#52675 closed feature request (maybelater)

Downgrading heading levels within post content on blog and archive pages

Reported by: asafm7's profile asafm7 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Themes Keywords:
Focuses: ui, accessibility Cc:

Description

On a blog page set to display full posts, post titles are downgraded from h1 to h2, but original h2 headings remain h2.

This creates a very confusing layout and affects accessibility. Maybe every heading should be downgraded one level when displayed on a blog page?

Change History (7)

#1 @SergeyBiryukov
2 years ago

  • Component changed from General to Bundled Theme
  • Focuses coding-standards removed

#2 @asafm7
2 years ago

  • Summary changed from Twenty Twenty: On an a blog page set to display full posts, post titles are downgraded from h1 to h2, but original h2 headings remain h2 to Twenty Nineteen: On an a blog page set to display full posts, post titles are downgraded from h1 to h2, but original h2 headings remain h2

I

This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.


2 years ago

#4 @ryokuhi
2 years ago

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

Hello @asafm7,
thanks for opening this ticket! It was discussed today during the weekly Accessibility Team's bug scrub.
The team agrees that this is an interesting edge case regarding headings hierarchy. Also, the issue isn't Twenty Nineteen specific, but all themes are affected by this.
The solution would be to downgrade all heading levels if the post is displayed in an archive context.
But what if a post contained all heading levels up to h6, how should that be changed in an archive page?
This issue would probably require some serious exploration and the solution might be better as plugin territory.

#5 @asafm7
2 years ago

Hi @ryokuhi ,

Thank you so much for the update.

Here are my thoughts:

  • I'm not sure about it being an edge case - it happens every time there is a subheading in a post, which is quite common I guess, and the blog page is set to display full posts, which is one of 2 available settings.
  • I'm not sure about it being in the plugin territory. Such basic HTML feels core-y to me...
  • I understand it is not just Twenty Nineteen related - maybe it should move to another forum?
  • There are 3 possible issues here:
    1. Confusing design - subheadings look like posts titles
    2. Accessibility
    3. SEO (which I didn't mention before). I'm not an expert, but archive pages are getting indexed by search engines. It makes sense that the flattened heading hierarchy makes it more difficult for search engines to understand what's on the page. In general, I believe that headings are crucial and basic SEO factors.
  • About the issue with h6 - I thought about it too. But I believe this is a true edge case. I believe not many blog posts use h6, and then you add the conditions needed to reproduce the issue - which makes it even less likely for h6 to be an issue. Anyway, an h6 heading can't be mistaken as a post title (it has a different size and design than a post title). The biggest issue is h1 and h2 being merged together and being mistaken for each other (both by humans and robots). It makes sense that content-wise as well h6 are less significant - and so having less effect on SEO. So, the solution for h6 doesn't need to be perfect. It can stay, for example, as h6.

These are my thoughts anyway.

Thanks again.


#6 @sabernhardt
2 years ago

  • Component changed from Bundled Theme to Themes
  • Summary changed from Twenty Nineteen: On an a blog page set to display full posts, post titles are downgraded from h1 to h2, but original h2 headings remain h2 to Downgrading heading levels within post content on blog and archive pages
  • Type changed from defect (bug) to feature request

Adding a content filter to adjust heading tags could help in many typical blogs, but it also might break some other sites.

For now, development probably fits better in a plugin. Then, if the filter belongs in core, it can be added there later as one of the default filters. If not, the functionality would still be available with the plugin.

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


2 years ago

Note: See TracTickets for help on using tickets.