This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23183 - html <a> tag component attribute "rel", category not a registered keyword: invalid markup
Summary: html <a> tag component attribute "rel", category not a registered keyword: in...
Status: RESOLVED FIXED
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL: URL is on private network, I can move...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-08 07:40 UTC by Matthew Darcy
Modified: 2015-08-23 07:07 UTC (History)
2 users (show)

See Also:


Attachments

Description Matthew Darcy 2013-09-08 07:40:33 UTC
While running a web page through the validator version 1.3 for a html5 document type I received the following validation failure.


    Error Line 147, Column 125: Bad value category for attribute rel on element a: The string category is not a registered keyword or absolute URL.

    …posts in Uncategorized" rel="category">Uncategorized</a></div> <div class="tag…

    Syntax of link type valid for <a> and <area>:
        A whitespace-separated list of link types, with no duplicate keywords in the list. Each link type must be listed as allowed on <a> and <area> in the HTML specification, or must be listed as allowed on <a> and <area> on the Microformats wiki, or must be an absolute URL. You can register link types on the Microformats wiki yourself. 




the full line being validated is.

[code]
<div class="categories"><a href="http://testbox02/cms/?cat=1" title="View all posts in Uncategorized" rel="category">Uncategorized</a></div> <div class="tags"></div> 
[/code]


From all the research I can do this appears to be valid html and as I investigate believe this should pass validation.

I'm logging this bug to confirm I am wrong/correct and hopefully get the validator rules updated.
Comment 1 Michael[tm] Smith 2013-09-10 23:30:33 UTC
Thanks for the report. I've added "category" now to the set of rel values that the validator recognizes. But if it's not working as expected for you, feel free to re-open this bug.
Comment 2 Jacopo 2014-03-22 21:58:19 UTC
I was checking some code, and found that the bug still occurs.


Examples:
<a rel="my-gallery" href="image.png" title="battle-report">...</a>
The value "my-gallery" is marked as an error
I tried also "image" and "gallery", they were reported as errors too.

According to http://microformats.org/wiki/rel-tag, the rel attribute can have an arbitrary value.

Jacopo
Comment 3 Michael[tm] Smith 2014-03-24 18:07:02 UTC
(In reply to Jacopo from comment #2)
> I was checking some code, and found that the bug still occurs.
> 
> Examples:
> <a rel="my-gallery" href="image.png" title="battle-report">...</a>
> The value "my-gallery" is marked as an error
> I tried also "image" and "gallery", they were reported as errors too.
> 
> According to http://microformats.org/wiki/rel-tag, the rel attribute can
> have an arbitrary value.

That page doesn't say that.

Regardless, it doesn't matter what that page says. The HTML spec says the rel attribute can't have any arbitrary value:

http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#attr-link-rel

Instead it has a set of standard "allowed keywords" that the spec defines, and then some extensions to that set of keywords, registered at:

 http://microformats.org/wiki/existing-rel-values
Comment 4 Jacopo 2014-03-26 01:07:34 UTC
I am sorry, but that exactly what it says (my "arbitrary" was meant to indicate the tag value, not its use).

Anyway, thanks for pointing out the actual spec.

Jacopo