Opened 10 years ago
Closed 10 years ago
#30057 closed defect (bug) (fixed)
Twenty Fifteen: Site description is not a heading, replace the h2 element for a p
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | 4.1 |
Component: | Bundled Theme | Keywords: | has-patch needs-testing commit |
Focuses: | accessibility | Cc: |
Description
The site description (bloginfo( 'description' )) should not be defined as an H2 heading in header.php
It is not a section or content title.
Therefore it will be better to place the site description inside a <p> element.
Since the styling is done with a class, it will have no impact on the visual presentation.
Attachments (2)
Change History (13)
#2
@
10 years ago
- Summary changed from Site description is not a heading, replace the h2 element for a p in Twentyfifteen to Twenty Fifteen: Site description is not a heading, replace the h2 element for a p
This ticket was mentioned in IRC in #wordpress-dev by iandstewart. View the logs.
10 years ago
#4
follow-up:
↓ 5
@
10 years ago
We've been rather inconsistent to date in using h1/h2 for site title/site description --
- TwentyTen used a div - https://core.trac.wordpress.org/browser/trunk/src/wp-content/themes/twentyten/header.php#L68
- TwentyEleven used h1/h2 in an hgroup - https://core.trac.wordpress.org/browser/trunk/src/wp-content/themes/twentyeleven/header.php#L75
- TwentyTwelve used h1/h2 in an hgroup - https://core.trac.wordpress.org/browser/trunk/src/wp-content/themes/twentytwelve/header.php#L39
- TwentyThirteen used h1/h2 in an hgroup - https://core.trac.wordpress.org/browser/trunk/src/wp-content/themes/twentythirteen/header.php#L38
- TwentyFourteen used a h2 in sidebar.php - https://core.trac.wordpress.org/browser/trunk/src/wp-content/themes/twentyfourteen/sidebar.php#L15
- TwentyFifteen now uses the same as eleven-thirteen -- h1/h2 <del>in an hgroup</del> - https://core.trac.wordpress.org/browser/trunk/src/wp-content/themes/twentyfifteen/header.php#L33
As long as it's clustered in an hgroup, it should be fine semantically, imho.
#5
in reply to:
↑ 4
@
10 years ago
Replying to georgestephanis:
As long as it's clustered in an hgroup, it should be fine semantically, imho.
Hgroup has been removed from the HTML 5 spec:
http://html5doctor.com/the-hgroup-element/
Furthermore, from an accessibility point of view there was no assistive tech that handled the hgroup element, so the relation between the h1 and h2 was not obvious. Since we don't have a describing h2 for the menu/main navigation, it might seem that the h2 with site description is a heading for the following section to users of AT, which it is not.
#8
@
10 years ago
The reason I posted this in a separate ticket is that this is a quick fix, with no consequences on any functionality and it improves accessibility. It also takes this heading out of the equation on how headings should be implemented like in ticket #30065.
A heading should point to content, and here that's not the case.
#9
in reply to:
↑ 7
@
10 years ago
Replying to iamtakashi:
Just to note that Twenty Fifteen doesn't use
hgroup
.
Whoops, my mistake. Eyes glossed over after the other five.
Replaces the H2 for a p for the site description in header.php