HTML5 validation fails with error:

Bad value shadowbox[field_project_img] for attribute rel on element a: Keyword shadowbox[field_project_img] is not registered.

Example Code:

<li><div class="sb-image sb-gallery sb-gallery-field_project_img"><a href="IMGURL" rel="shadowbox[field_project_img]" title="TITLE"><img src="THUMBNAIL" alt="ALT TEXT" /></a></div></li>

Comments

sebastian.grow’s picture

Status: Active » Needs work
manfer’s picture

Status: Needs work » Closed (won't fix)

I don't know which validator can you be using but... HTML5 specification is a work in progress. So as long as there is not a finished HTML5 specification how can we start to think about validations of that specification?

But I don't know why a validator has to trigger that notice because in the work in progress HTML5 specification we can read about the rel attribute.

The rel attribute on a and area elements controls what kinds of links the elements create. The attribue's value must be a set of space-separated tokens. The allowed keywords and their meanings are defined below.

The rel attribute has no default value. If the attribute is omitted or if none of the values in the attribute are recognized by the user agent, then the document has no particular relationship with the destination resource other than there being a hyperlink between the two.

That yes says there are only some specific allowed values but from the second paragraph we can understand that does not matter to have custom values that are going to be ignored by the user agent if they are not recognized.

Anyway that shadowbox or shadowbox[gallery_name] values for rel attribute are the ones used by shadowbox javascript library to identify shadowbox links so unless that library changes the way it work then it is not going to validate in an HTML5 validator that only allows the rel values listed in HTML5 specification.

This issue anyway should be targetted to shadowbox javascript library. So if you want maybe you can report it opening an issue in https://github.com/mjijackson/shadowbox/issues The developer is just starting the develop of version 4 of the library and he is still using those values shadowbox and shadowbox[gallery_name] for the rel attribute.