Re: tweet and pin button attributes failing validation

Giganews Newsgroups
Subject: Re: tweet and pin button attributes failing validation
Posted by:  Jonathan N. Little (lws4a…@gmail.com)
Date: Mon, 08 Apr 2013

lipska the kat wrote:
> Hi
>
> I have a web application that uses buttons provided
> by twitter and pinterest to tweet and pin various images to the relevant
> social networking sites. I'm trying to get the site to pass w3
> validation but I'm falling over with the organization specific
> attributes, the attributes concerned are
>
> data-via, data-dnt, data-text, data-url, count-layout
>
> How do you pass validation when you have non-standard attributes in an
> href?

You won't with the crap code that these social network sites spew. There
is not really much you can do if you wish to include them. What I did on
my site was to have a php place target elements on pages and then a
JavaScript function that post processes to inject the Facebook buttons.
It "validates" and since these sites like Facebook require JavaScript to
function the FB fans will get their button and I don't have to look at
their lousy markup! ;-) It's a bit silly though.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Replies

In response to

tweet and pin button attributes failing validation posted by lipska the kat on Mon, 08 Apr 2013