Gallery of lightboxes rel with checking array parameters

I am trying to check the page where I implemented Lightbox, and the W3C considers rel = "lightbox ['gallery']" the wrong code. Code:

  <a rel="lightbox[galleryapter" href="link-to-image"> 
... image ...
</a>

Error:

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

Any understanding of this is appreciated.

+4
source share
4 answers

At the very least, it’s more convenient for me to use “target” instead of “rel” or “data-rel” (which is not a standard attribute of a link anyway), thereby still passing the w3 HTML5 check and not touching the CSS setup page ( "class" is usually used for layout, etc.). Of course, all "* .getAttribute ('rel')" in the javascript source needs to be updated accordingly.

+7
source

You are trying to test HTML5, right?

It's simple enough, I'm afraid; while HTML4 allows almost any content in rel, HTML5 is much more restrictive, and "lightbox [gallery]" is not a registered rel type.

I saw a fix that should work: get Lightbox look for class = "lightbox [gallery]" instead of rel = "lightbox [gallery]", but so far my inept tweaks haven't worked. I am trying to contact a lightbox developer to ask him about it, but his forum gives 500 errors. Not a good sign. :(

0
source

Or a better idea - in my opinion, use data-rel instead of data-rel . But also you need to change a little lightbox ,-)

0
source

With Lightbox2 you should use

 <strong><a data-lightbox="lightbox[gallery]" href="link-to-image"></strong> 

instead

 <strong><a rel="lightbox[gallery]" href="link-to-image"></strong> 

This will be validated as HTML5.

0
source

All Articles