<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: HTML5 Custom Data Attributes (data-*)</title>
	<atom:link href="http://html5doctor.com/html5-custom-data-attributes/feed/" rel="self" type="application/rss+xml" />
	<link>http://html5doctor.com/html5-custom-data-attributes/</link>
	<description>helping you implement HTML5 today</description>
	<lastBuildDate>Tue, 07 Feb 2012 11:44:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Mag Leahy</title>
		<link>http://html5doctor.com/html5-custom-data-attributes/#comment-17958</link>
		<dc:creator>Mag Leahy</dc:creator>
		<pubDate>Fri, 07 Oct 2011 15:34:49 +0000</pubDate>
		<guid isPermaLink="false">http://html5doctor.com/?p=1874#comment-17958</guid>
		<description>I like this a lot!</description>
		<content:encoded><![CDATA[<p>I like this a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gleenk</title>
		<link>http://html5doctor.com/html5-custom-data-attributes/#comment-17839</link>
		<dc:creator>Gleenk</dc:creator>
		<pubDate>Fri, 30 Sep 2011 11:49:07 +0000</pubDate>
		<guid isPermaLink="false">http://html5doctor.com/?p=1874#comment-17839</guid>
		<description>But what are the support for html5 doctype?</description>
		<content:encoded><![CDATA[<p>But what are the support for html5 doctype?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathon</title>
		<link>http://html5doctor.com/html5-custom-data-attributes/#comment-17520</link>
		<dc:creator>Jonathon</dc:creator>
		<pubDate>Thu, 08 Sep 2011 10:18:04 +0000</pubDate>
		<guid isPermaLink="false">http://html5doctor.com/?p=1874#comment-17520</guid>
		<description>surely styling to data-* makes sense in a data rich web app rather than bloating the class attribute? 

in pseudo code interfacing with the data as a user interface: &lt;code&gt;remove class X
add class Y &lt;/code&gt;
as a feedback on and as a consequence of a user action

vs &lt;code&gt;change data-* to Y&lt;/code&gt;

not that looking at the underlying DOM is critical for the enduser, but filling class with non-hierarchical data FOR THE SAKE OF STYLING seems more wrong than styling to data also being held???</description>
		<content:encoded><![CDATA[<p>surely styling to data-* makes sense in a data rich web app rather than bloating the class attribute? </p>
<p>in pseudo code interfacing with the data as a user interface: <code>remove class X<br />
add class Y </code><br />
as a feedback on and as a consequence of a user action</p>
<p>vs <code>change data-* to Y</code></p>
<p>not that looking at the underlying DOM is critical for the enduser, but filling class with non-hierarchical data FOR THE SAKE OF STYLING seems more wrong than styling to data also being held???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BJ</title>
		<link>http://html5doctor.com/html5-custom-data-attributes/#comment-17260</link>
		<dc:creator>BJ</dc:creator>
		<pubDate>Sun, 21 Aug 2011 19:42:46 +0000</pubDate>
		<guid isPermaLink="false">http://html5doctor.com/?p=1874#comment-17260</guid>
		<description>&quot;Thanks to HTML5, we now have the ability to embed custom data attributes on all HTML elements[!!11!!1!1!]&quot;

Wow, like expando properties avail since IE4? Thanks HTML5, you&#039;re the best!  

OK, assuming &quot;dataset&quot; provides a collection of values across multiple elements, that&#039;s kind of useful (although already trivial via jQuery) .. but this article smacks of feature amnesia.</description>
		<content:encoded><![CDATA[<p>&#8220;Thanks to HTML5, we now have the ability to embed custom data attributes on all HTML elements[!!11!!1!1!]&#8220;</p>
<p>Wow, like expando properties avail since IE4? Thanks HTML5, you&#8217;re the best!  </p>
<p>OK, assuming &#8220;dataset&#8221; provides a collection of values across multiple elements, that&#8217;s kind of useful (although already trivial via jQuery) .. but this article smacks of feature amnesia.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ryanve</title>
		<link>http://html5doctor.com/html5-custom-data-attributes/#comment-17158</link>
		<dc:creator>ryanve</dc:creator>
		<pubDate>Sat, 13 Aug 2011 16:24:54 +0000</pubDate>
		<guid isPermaLink="false">http://html5doctor.com/?p=1874#comment-17158</guid>
		<description>Would data attributes be appropriate for something like switching an ``&#039;s src attribute between a hi-res and lo-res version (for better performing responsive design)? (&lt;a href=&quot;http://stackoverflow.com/questions/7050976/each-attr-or-this&quot; rel=&quot;nofollow&quot;&gt;Something like this&lt;/a&gt;)

Also what is the best way to test support for this?</description>
		<content:encoded><![CDATA[<p>Would data attributes be appropriate for something like switching an &#8220;&#8217;s src attribute between a hi-res and lo-res version (for better performing responsive design)? (<a href="http://stackoverflow.com/questions/7050976/each-attr-or-this" rel="nofollow">Something like this</a>)</p>
<p>Also what is the best way to test support for this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kevin</title>
		<link>http://html5doctor.com/html5-custom-data-attributes/#comment-17061</link>
		<dc:creator>kevin</dc:creator>
		<pubDate>Mon, 08 Aug 2011 15:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://html5doctor.com/?p=1874#comment-17061</guid>
		<description>I use the data attributes a lot for jQuery apps. This attribute is for you to store private data for your application. If you are planning to have data understood by the search engines, you could use microdata which is more semantic.</description>
		<content:encoded><![CDATA[<p>I use the data attributes a lot for jQuery apps. This attribute is for you to store private data for your application. If you are planning to have data understood by the search engines, you could use microdata which is more semantic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Bewick</title>
		<link>http://html5doctor.com/html5-custom-data-attributes/#comment-17041</link>
		<dc:creator>Chris Bewick</dc:creator>
		<pubDate>Thu, 04 Aug 2011 07:53:17 +0000</pubDate>
		<guid isPermaLink="false">http://html5doctor.com/?p=1874#comment-17041</guid>
		<description>@Andres - data-* is only for storing data which is to be used within your own website. As the primary purpose of ARIA roles is to communicate additional page structure to the browser/screenreader this would not be an appropriate time to use them. Stick with role=&quot;main&quot;.</description>
		<content:encoded><![CDATA[<p>@Andres &#8211; data-* is only for storing data which is to be used within your own website. As the primary purpose of ARIA roles is to communicate additional page structure to the browser/screenreader this would not be an appropriate time to use them. Stick with role=&#8221;main&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andres</title>
		<link>http://html5doctor.com/html5-custom-data-attributes/#comment-17037</link>
		<dc:creator>Andres</dc:creator>
		<pubDate>Wed, 03 Aug 2011 17:17:37 +0000</pubDate>
		<guid isPermaLink="false">http://html5doctor.com/?p=1874#comment-17037</guid>
		<description>If i&#039;m using ARIA, should I  add the attribute as &quot;data-role&quot; or just &quot;role&quot;????

are both valid?</description>
		<content:encoded><![CDATA[<p>If i&#8217;m using ARIA, should I  add the attribute as &#8220;data-role&#8221; or just &#8220;role&#8221;????</p>
<p>are both valid?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://html5doctor.com/html5-custom-data-attributes/#comment-15179</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Thu, 16 Jun 2011 15:57:39 +0000</pubDate>
		<guid isPermaLink="false">http://html5doctor.com/?p=1874#comment-15179</guid>
		<description>I&#039;ve found a case where I feel using the data-* attributes for CSS hooks is valid. Feedback is, of course, welcome.

I have an HTML table of data that can be sorted, ascending and descending, with AJAX by clicking on the column headers. I opted to use a data-sort-dir=&quot;asc&quot; attribute on the column header to not only tell the AJAX call which direction to sort the request, but also to create an arrow next to the column header indicating which direction the arrow points.

&lt;code&gt;
a[data-sort-dir=&quot;asc&quot;] {
    /* Show the ascending arrow */
}

a[data-sort-dir=&quot;desc&quot;] {
    /* Show the descending arrow */
}
&lt;/code&gt;

When a column header is clicked, the data-sort-dir attribute is updated or moved to properly reflect which direction is being sorted.

I also agree that the carrot example was a poor example since you&#039;re storing data to display to the user in another method which was stated to be against the spec. In that case, the hidden element option David R posed in the comments or using the title attribute probably would&#039;ve been better.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve found a case where I feel using the data-* attributes for CSS hooks is valid. Feedback is, of course, welcome.</p>
<p>I have an HTML table of data that can be sorted, ascending and descending, with AJAX by clicking on the column headers. I opted to use a data-sort-dir=&#8221;asc&#8221; attribute on the column header to not only tell the AJAX call which direction to sort the request, but also to create an arrow next to the column header indicating which direction the arrow points.</p>
<p><code><br />
a[data-sort-dir="asc"] {<br />
    /* Show the ascending arrow */<br />
}</code></p>
<p>a[data-sort-dir="desc"] {<br />
    /* Show the descending arrow */<br />
}<br />
</p>
<p>When a column header is clicked, the data-sort-dir attribute is updated or moved to properly reflect which direction is being sorted.</p>
<p>I also agree that the carrot example was a poor example since you&#8217;re storing data to display to the user in another method which was stated to be against the spec. In that case, the hidden element option David R posed in the comments or using the title attribute probably would&#8217;ve been better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Conrad Damon</title>
		<link>http://html5doctor.com/html5-custom-data-attributes/#comment-15055</link>
		<dc:creator>Conrad Damon</dc:creator>
		<pubDate>Thu, 26 May 2011 23:41:42 +0000</pubDate>
		<guid isPermaLink="false">http://html5doctor.com/?p=1874#comment-15055</guid>
		<description>What about expando properties? Data attributes strike me as a namespaced (with &quot;data-&quot;) hash of expando properties, with the added dataset convenience. How do the following compare?

    plant.setAttribute(&#039;data-fruit&#039;,&#039;7&#039;);

    plant.fruit = 7;

In general I&#039;ve just stored element-related data in memory in a hash or object that can be retrieved based on the element&#039;s ID.</description>
		<content:encoded><![CDATA[<p>What about expando properties? Data attributes strike me as a namespaced (with &#8220;data-&#8221;) hash of expando properties, with the added dataset convenience. How do the following compare?</p>
<p>    plant.setAttribute(&#8216;data-fruit&#8217;,&#8217;7&#8242;);</p>
<p>    plant.fruit = 7;</p>
<p>In general I&#8217;ve just stored element-related data in memory in a hash or object that can be retrieved based on the element&#8217;s ID.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

