Make WordPress Core

Opened 8 years ago

Last modified 6 weeks ago

#39044 new defect (bug)

HTML5 Comments create an `article` element without headings, generating validation errors.

Reported by: henrywright's profile henry.wright Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.6.1
Component: Comments Keywords:
Focuses: accessibility Cc:

Description (last modified by joedolson)

Previous title: "W3C Validator warning: Article lacks heading. Consider using h2-h6 elements to add identifying headings to all articles "

File: wp-includes/class-walker-comment.php

Screenshot incoming.

Attachments (1)

Screenshot 2016-12-04 at 13.05.07.png (14.4 KB) - added by henry.wright 8 years ago.

Download all attachments as: .zip

Change History (9)

#1 @henry.wright
8 years ago

Just to add, I believe you need to enable theme support for html5 to see this.

#2 @davidakennedy
8 years ago

  • Focuses accessibility added
  • Milestone changed from Awaiting Review to Future Release

This could potentially be improved, but changing the markup could cause issues with current themes. So this needs to be discussed more.

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


7 years ago

#4 @audrasjb
7 years ago

Discussed today during accessibility team meetup.

William Patton send us a stat from theme repository:
About 30% of themes in directory use HTML5 comments (and then, <article> HTML element).

Seems to be difficult to manage in terms of backward compatibility…

We can later ask Theme Review Team to get an accurate figure on how many of those themes are targeting <article> inside of comments for styling as well so we can get a decent figure of impact.

This ticket was mentioned in Slack in #core-editor by noisysocks. View the logs.


5 years ago

#6 @noisysocks
5 years ago

This came up in https://github.com/WordPress/gutenberg/issues/8253 too as the Latest Comments block uses the markup that Core uses for comments.

If a decision is made here to change the markup, then let's be sure to modify it in the Latest Comments block as well.

Last edited 5 years ago by noisysocks (previous) (diff)

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


6 weeks ago

#8 @joedolson
6 weeks ago

  • Component changed from General to Comments
  • Description modified (diff)
  • Summary changed from W3C Validator warning: Article lacks heading. Consider using h2-h6 elements to add identifying headings to all articles to HTML5 Comments create an `article` element without headings, generating validation errors.

Updating the ticket title for clarity and moving into the Comments component.

Note: See TracTickets for help on using tickets.