Ticket #17632 (new defect (bug))
HTML 5 Validation issues (theme independent)
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | General | Version: | 3.1.3 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | lynne.pope@… |
Description
Wordpress often adds the rel attribute to links.
For example rel="category" or rel="attachment" etc...
Apparently these keywords are not allowed in html 5 :
http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#linkTypes
So the validation fails :-/
These attributes are a bit hardcoded. You can use regex in filters or javascript solutions to remove them, but this is not a good solution.
I think this problem is now a bug, if you consider the importance of code validation.
Attachments
Change History
comment:1
johnbillion — 9 months ago
- Keywords close added
comment:2
amirhabibi — 9 months ago
I understand that html5 is not final, but having control over the hardcoded keywords would be nice and will make wordpress validate in html5 without custom fuctions...
- Keywords needs-patch added; close removed
This issue probably shouldn't be titled "HTML5 Validation" because it relates to ALL validation.
Neither category or attachment are valid microformats, no matter whether you use HTML or XHTML. They never have been. Where WordPress outputs rel="category" it should be rel="tag". While there is currently no microformat for attachments there is case to be made for changing this to rel="enclosure".
rel="enclosure" is still just a draft but its already in use and likely to be approved. It's already recognised in the Atom Syndication Format ( http://www.ietf.org/rfc/rfc4287.txt).
- Version changed from 3.1.3 to 3.2.1
In HTML5, the tag element is allowed as a rel property (see http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#linkTypes ) so it should be rel="tag" and the word category should be removed. This should fix this validation issue.
comment:6
SergeyBiryukov — 6 months ago
- Keywords has-patch added; needs-patch removed
- Version changed from 3.2.1 to 3.1.3
17632.patch removes rel="category", leaving rel="tag".
Shouldn't categories be rel="tag" then? Categories are a valid taxonomy classification.
comment:8
in reply to:
↑ 7
SergeyBiryukov — 3 months ago
comment:9
WraithKenny — 3 months ago
As "tag" represents taxonomy basically, dropping "category" sounds great. If anyone objects, perhaps at least a filter?


Does the value of the rel attribute actually have anything to do with validation? The list of existing rel values on the Microformats site does not appear to form part of the HTML 5 spec but acts as a de-facto list, from what I can see. Please correct me if I am wrong.
On a different note, the HTML 5 spec is a long way from being final. Definitely not a good idea to go pre-emptively changing things in core yet.