The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Validation errors - no attribute DATA-COUNT,DATA-VIA
Beth
post Feb 27 2011, 05:41 PM
Post #1


Novice
**

Group: Members
Posts: 21
Joined: 26-March 07
Member No.: 2,339



Hi,

I am trying to validate my pages, but I am getting the following errors on which are for my twitter button. I am using HTML 4.01 Transitional. I have found that this version does not support these attributes, but is there any way to work around this so that I can have the button on my page? I saw that you can use an iframe, but that had it's own error and I would prefer not to use it.

•Line 16, character 12:
data-count="none" data-via="CozyCactusGifts">Tweet</a>
^Error: there is no attribute DATA-COUNT for this element (in this HTML version)

•Line 16, character 28:
data-count="none" data-via="CozyCactusGifts">Tweet</a>
^Error: there is no attribute DATA-VIA for this element (in this HTML version)


The page is: wedding gifts

CODE
<a href="http://twitter.com/share" class="twitter-share-button"
data-count="none" data-via="CozyCactusGifts">Tweet</a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></li>


Thanks for your help!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 27 2011, 05:51 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Well, there is no such attribute. They have invented it for their own use. It won't harm anything to leave it as it is.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Beth
post Feb 27 2011, 05:54 PM
Post #3


Novice
**

Group: Members
Posts: 21
Joined: 26-March 07
Member No.: 2,339



Bummer! I like to keep my pages nice and validated -- makes me feel like I'm getting an A++ or something! Oh well smile.gif

Thanks for the info!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 27 2011, 06:01 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



It's surprising that Twitter does that. It must annoy many people. I didn't know.

What you could do, even if it's just paying lip service, is to let JavaScript write out the Twitter link so the validator doesn't see it. A little silly, me thinks, but it was a popular way to "hide" junk code while ago.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Beth
post Feb 27 2011, 06:06 PM
Post #5


Novice
**

Group: Members
Posts: 21
Joined: 26-March 07
Member No.: 2,339



I did find that a lot of people had the same problem, but couldn't find any answers.

QUOTE
let JavaScript write out the Twitter link so the validator doesn't see it


How do I do that?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th April 2024 - 05:47 AM