Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#61768 closed defect (bug) (duplicate)

Twenty Twelve outputs an empty heading if the tagline is empty

Reported by: poena Owned by:
Priority: normal Milestone:
Component: Bundled Theme Version:
Severity: normal Keywords: has-patch
Cc: Focuses: accessibility

Description

If a user leaves the tagline option empty, the theme prints an empty H2 heading below the site title in the header.
You can test this by leaving the tagline option empty in the Customizer or Settings > General, and then viewing the source of any page on the front of the website.

<h1 class="site-title"><a href="http://66.local/" rel="home">Site Title</a></h1>
<h2 class="site-description"></h2>

This is an error according to WCAG and makes it more difficult for some users to navigate the page using headings.
Here is a good summary of why: https://equalizedigital.com/accessibility-checker/empty-heading/

This heading should only be output on the page if there is a tagline.

Change History (6)

This ticket was mentioned in PR #7098 on WordPress/wordpress-develop by @narenin.


2 years ago
#1

  • Keywords has-patch added

#2 @mukesh27
2 years ago

@poena All old themes( 2012, 2013, 2014, etc.. ) have same issue when the tagline is empty

#3 @sabernhardt
2 years ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

#44656 already tracks this with the potentially empty links.

#4 @karmatosed
2 years ago

@sabernhardt should this be marked as a duplicate then? I'm cautious with the patch on this and the other to make sure which one we get in and not trip over the other.

#5 @sabernhardt
2 years ago

If it's easier, I suppose this could be reopened to take care of one theme, and then the other ticket could follow up for the other themes that need a similar change.

#6 @karmatosed
2 years ago

No, that makes sense to focus on the other one for all - just wanted to be sure.

Note: See TracTickets for help on using tickets.