#22095 closed defect (bug) (fixed)
Twenty Twelve: markup fails HTML validation
Reported by: | alexvorn2 | Owned by: | |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | close |
Focuses: | Cc: |
Description
http://validator.w3.org/ - the theme gives me 4 errors, most can be found in twentytwelve_entry_meta() function like:
$date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a>', esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) );
Error example:
"Attribute pubdate not allowed on element time at this point."
There are other errors, the point of this ticket is to check all possible errors and make the theme validated.
Change History (13)
#3
in reply to:
↑ 2
@
12 years ago
Replying to lancewillett:
this is not my first ticket here!
Steps to replicate: open the source of the html code, copy, go to the site: http://validator.w3.org/ , paste and submit, you will get from 4 to 20 errors...
#4
follow-up:
↓ 5
@
12 years ago
- Summary changed from Invalid markup of Twenty Twelve to Twenty Twelve: markup fails HTML validation
Oh, I see pubdate
in the example you posted now, sorry about misreading the report.
Per http://www.w3.org/html/wg/tracker/issues/185 it's still in HTML spec, I'd like to still use it until it's officially dropped.
The key with HTML (and CSS) validation is understanding *why* something is reported as invalid and why it's OK to ignore the warning. In this case, it's safe to ignore it.
#5
in reply to:
↑ 4
;
follow-ups:
↓ 6
↓ 7
@
12 years ago
Replying to lancewillett:
Oh, I see
pubdate
in the example you posted now, sorry about misreading the report.
Per http://www.w3.org/html/wg/tracker/issues/185 it's still in HTML spec, I'd like to still use it until it's officially dropped.
The key with HTML (and CSS) validation is understanding *why* something is reported as invalid and why it's OK to ignore the warning. In this case, it's safe to ignore it.
What about: "Bad value category tag for attribute rel on element a: Keyword category is not registered." ?
#7
in reply to:
↑ 5
@
12 years ago
Replying to alexvorn2:
What about: "Bad value category tag for attribute rel on element a: Keyword category is not registered." ?
Much discussion on those elsewhere, as noted above.
#8
@
12 years ago
- Milestone changed from Awaiting Review to 3.5
More clarity to this discussion:
Three basic validation failures:
- rel value of
category
not allowed — covered in #17632, and comes from WP core code - rel value of
generator
not allowed — no longer in Microformats spec (can't find a history of it anywhere); originally came from the Sandbox theme by Scott Wallick pubdate
in the time element — dropped from both living specs (WHATWG and W3C WG)
After discussion in #wordpress-dev IRC and also consulting with @iandstewart on the history of 2 and 3 — seems best to remove 2 and 3 from all the default themes at this point.
We've already validated the HTML heavily during theme development and fixed broken things having to do with the theme markup.
Looking at the validator results again today all the warnings I see are for attributes that are not allowed, which appear to come from using WP core functionality -- not from markup included in the theme itself.
Suggest close as wontfix unless there are actionable items you think WP core should fix.