<?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: Any-Element Linking Demo</title>
	<atom:link href="http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/feed/" rel="self" type="application/rss+xml" />
	<link>http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/</link>
	<description>Things that Eric A. Meyer, CSS expert, writes about on his personal Web site; it&#039;s largely Web standards and Web technology, but also various bits of culture, politics, personal observations, and other miscellaneous stuff</description>
	<lastBuildDate>Fri, 19 Mar 2010 00:27:46 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dennis File</title>
		<link>http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-494993</link>
		<dc:creator>Dennis File</dc:creator>
		<pubDate>Wed, 17 Mar 2010 18:47:03 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=918#comment-494993</guid>
		<description>You could add &quot;visited&quot; functionality, but it&#039;d be confusing. You would use javascript to dynamically create an &lt;a&gt; tag with the href of the to-be-created imitation hyperlink. Then use CSS to position:absolute the A tag off the screen. Then use something along the lines of

&lt;code&gt;#detector:visited { height:100px; }&lt;/code&gt;

where #detector is the hidden A element. Then use JS to get that A element&#039;s offsetHeight, and find if the link has been visited. If so, change the style of the imitated hyperlink.</description>
		<content:encoded><![CDATA[<p>You could add &#8220;visited&#8221; functionality, but it&#8217;d be confusing. You would use javascript to dynamically create an &lt;a&gt; tag with the href of the to-be-created imitation hyperlink. Then use CSS to position:absolute the A tag off the screen. Then use something along the lines of</p>
<p><code>#detector:visited { height:100px; }</code></p>
<p>where #detector is the hidden A element. Then use JS to get that A element&#8217;s offsetHeight, and find if the link has been visited. If so, change the style of the imitated hyperlink.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Clickable &#60;li&#62; &#171; I Love Usability</title>
		<link>http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-479332</link>
		<dc:creator>Clickable &#60;li&#62; &#171; I Love Usability</dc:creator>
		<pubDate>Tue, 13 Oct 2009 14:26:52 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=918#comment-479332</guid>
		<description>[...] with this if I want to make the entire list item a link, but there is some hope for the future. Eric Meyer proposed any element linking in which you could give any element an href property. Wouldn&#8217;t it be nice to be able to do [...]</description>
		<content:encoded><![CDATA[<p>[...] with this if I want to make the entire list item a link, but there is some hope for the future. Eric Meyer proposed any element linking in which you could give any element an href property. Wouldn&#8217;t it be nice to be able to do [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kit Grose</title>
		<link>http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-415821</link>
		<dc:creator>Kit Grose</dc:creator>
		<pubDate>Fri, 17 Oct 2008 08:05:14 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=918#comment-415821</guid>
		<description>I am a huge supporter of this functionality. I don&#039;t see any logical reason to limit the functionality to table cells only (but I don&#039;t think *every* element should be href-able; HTML and BODY are the obvious examples).

The biggest issue I can see with allowing links to wrap any elements is Hixie&#039;s oft-stated goal to make sure the HTML5 specification for error behaviour is well-defined, which could be difficult for structures like:
&lt;code&gt;
&lt;a href=&quot;#example&quot;&gt;&lt;tr&gt;&lt;td&gt;Content&lt;/td&gt;&lt;td&gt;Content&lt;/td&gt;&lt;/a&gt;&lt;td&gt;Content&lt;/td&gt;&lt;/tr&gt;
&lt;/code&gt;

where the author has no obvious implied intent (wanting to link the entire row? the two first cells?).</description>
		<content:encoded><![CDATA[<p>I am a huge supporter of this functionality. I don&#8217;t see any logical reason to limit the functionality to table cells only (but I don&#8217;t think *every* element should be href-able; HTML and BODY are the obvious examples).</p>
<p>The biggest issue I can see with allowing links to wrap any elements is Hixie&#8217;s oft-stated goal to make sure the HTML5 specification for error behaviour is well-defined, which could be difficult for structures like:<br />
<code><br />
&lt;a href="#example"&gt;&lt;tr&gt;&lt;td&gt;Content&lt;/td&gt;&lt;td&gt;Content&lt;/td&gt;&lt;/a&gt;&lt;td&gt;Content&lt;/td&gt;&lt;/tr&gt;<br />
</code></p>
<p>where the author has no obvious implied intent (wanting to link the entire row? the two first cells?).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce Lawson&#8217;s personal site&#160; : Any-Element Linking in HTML 5</title>
		<link>http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-409643</link>
		<dc:creator>Bruce Lawson&#8217;s personal site&#160; : Any-Element Linking in HTML 5</dc:creator>
		<pubDate>Thu, 18 Sep 2008 08:32:57 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=918#comment-409643</guid>
		<description>[...] 5 should allow any element should be able to turn into a link by taking an href attribute - see his Any-Element Linking Demo. I suggested that, as a stop gap, HTML 5 should legalise the fact that all the big five browsers [...]</description>
		<content:encoded><![CDATA[<p>[...] 5 should allow any element should be able to turn into a link by taking an href attribute &#8211; see his Any-Element Linking Demo. I suggested that, as a stop gap, HTML 5 should legalise the fact that all the big five browsers [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michaël Guitton</title>
		<link>http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-399769</link>
		<dc:creator>Michaël Guitton</dc:creator>
		<pubDate>Tue, 12 Aug 2008 16:36:13 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=918#comment-399769</guid>
		<description>&lt;blockquote&gt;And hey, if anyone wants to contribute improvements to the JS [...]&lt;/blockquote&gt;

IMHO you should drop the onload handler on body and attach the script just before the body closing tag:
 
(function() {

    function click() {
        window.location = this.getAttribute(&#039;href&#039;);
    }
    
    function mouseover(e) {
        window.status = this.getAttribute(&#039;href&#039;);
        (e &#124;&#124; window.event).cancelBubble = true;
    }
    
    function mouseout() {
        window.status = &#039;&#039;;
    }
    
    var coll = document.getElementsByTagName(&#039;body&#039;)[0].getElementsByTagName(&#039;*&#039;);
    for (var i = 0, all = coll.length; i &lt; all; i++) {
        var el = coll[i];
        if (el.hasAttribute(&#039;href&#039;)) {
            el.onclick     = click;
            el.onmouseover = mouseover;
            el.onmouseout  = mouseout;
        }
    }
})();</description>
		<content:encoded><![CDATA[<blockquote><p>And hey, if anyone wants to contribute improvements to the JS [...]</p></blockquote>
<p>IMHO you should drop the onload handler on body and attach the script just before the body closing tag:</p>
<p>(function() {</p>
<p>    function click() {<br />
        window.location = this.getAttribute(&#8216;href&#8217;);<br />
    }</p>
<p>    function mouseover(e) {<br />
        window.status = this.getAttribute(&#8216;href&#8217;);<br />
        (e || window.event).cancelBubble = true;<br />
    }</p>
<p>    function mouseout() {<br />
        window.status = &#8221;;<br />
    }</p>
<p>    var coll = document.getElementsByTagName(&#8216;body&#8217;)[0].getElementsByTagName(&#8216;*&#8217;);<br />
    for (var i = 0, all = coll.length; i &lt; all; i++) {<br />
        var el = coll[i];<br />
        if (el.hasAttribute(&#8216;href&#8217;)) {<br />
            el.onclick     = click;<br />
            el.onmouseover = mouseover;<br />
            el.onmouseout  = mouseout;<br />
        }<br />
    }<br />
})();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: koew</title>
		<link>http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-399598</link>
		<dc:creator>koew</dc:creator>
		<pubDate>Mon, 11 Aug 2008 13:56:24 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=918#comment-399598</guid>
		<description>Ian: By using ID&#039;s instead of anchor names, you could remove the &lt;a&gt;-tag completely - if the any-element-linking would become standard.

I can already imagine the nice table designs with easy-to-eye colourization, and how it would (hopefully) help users finding their data.</description>
		<content:encoded><![CDATA[<p>Ian: By using ID&#8217;s instead of anchor names, you could remove the &lt;a&gt;-tag completely &#8211; if the any-element-linking would become standard.</p>
<p>I can already imagine the nice table designs with easy-to-eye colourization, and how it would (hopefully) help users finding their data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian</title>
		<link>http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-399534</link>
		<dc:creator>Ian</dc:creator>
		<pubDate>Mon, 11 Aug 2008 02:11:36 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=918#comment-399534</guid>
		<description>I read this article a few weeks ago.  It makes perfect sense to me.  
Then, after pondering, I pondered...

Does this not in the future lead to a (mostly) redundant &lt;a&gt; tag? 

If every tag supports an href attribute, we won&#039;t need an extra &lt;a&gt; tag to make links.
-  &lt;span&gt; can be used for in-para links
-  css can target it via the CSS3 attribute selector

The only remaining use for the &lt;a&gt; would be to define a bookmark/anchor.

It seems too simple.  Have I missed something?</description>
		<content:encoded><![CDATA[<p>I read this article a few weeks ago.  It makes perfect sense to me.<br />
Then, after pondering, I pondered&#8230;</p>
<p>Does this not in the future lead to a (mostly) redundant &lt;a&gt; tag? </p>
<p>If every tag supports an href attribute, we won&#8217;t need an extra &lt;a&gt; tag to make links.<br />
-  &lt;span&gt; can be used for in-para links<br />
-  css can target it via the CSS3 attribute selector</p>
<p>The only remaining use for the &lt;a&gt; would be to define a bookmark/anchor.</p>
<p>It seems too simple.  Have I missed something?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bruce</title>
		<link>http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-399115</link>
		<dc:creator>bruce</dc:creator>
		<pubDate>Fri, 08 Aug 2008 08:18:52 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=918#comment-399115</guid>
		<description>You&#039;re welcome! (That&#039;s what Opera pay me for ...)

I&#039;ve re-sent email-- let me know if you don&#039;t get it.</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome! (That&#8217;s what Opera pay me for &#8230;)</p>
<p>I&#8217;ve re-sent email&#8211; let me know if you don&#8217;t get it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Meyer</title>
		<link>http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-398994</link>
		<dc:creator>Eric Meyer</dc:creator>
		<pubDate>Thu, 07 Aug 2008 20:59:21 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=918#comment-398994</guid>
		<description>I&#039;ve been thinking much the same since seeing Bruce&#039;s demo, &lt;a href=&quot;http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-398986&quot; rel=&quot;nofollow&quot;&gt;Wolfgang&lt;/a&gt;-- push for both, with (improved) wrapping support in the near term and attribute expansion on a longer timeline.

&lt;a href=&quot;http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-398941&quot; rel=&quot;nofollow&quot;&gt;Bruce&lt;/a&gt;, thank you many times over for creating that demo and dropping me a pointer here.  I don&#039;t think I did get your mail-- can you try sending it again, please?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been thinking much the same since seeing Bruce&#8217;s demo, <a href="http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-398986" rel="nofollow">Wolfgang</a>&#8211; push for both, with (improved) wrapping support in the near term and attribute expansion on a longer timeline.</p>
<p><a href="http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-398941" rel="nofollow">Bruce</a>, thank you many times over for creating that demo and dropping me a pointer here.  I don&#8217;t think I did get your mail&#8211; can you try sending it again, please?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wolfgang Löer</title>
		<link>http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-398986</link>
		<dc:creator>Wolfgang Löer</dc:creator>
		<pubDate>Thu, 07 Aug 2008 20:05:27 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=918#comment-398986</guid>
		<description>&lt;a href=&quot;http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-398941&quot; rel=&quot;nofollow&quot;&gt;bruce:&lt;/a&gt; actually i use &lt;a&gt; around block-elements simliarly to your (first) test &lt;a href=&quot;http://analythis.com/arbeitsproben/uebersicht-design-arbeitsproben.html&quot; rel=&quot;nofollow&quot;&gt;on my own site&lt;/a&gt; (because i wanted &lt;h2&gt; in it and the full box linked and i was lazy) and noticed only rarely a small rendering-problem in ff. (it then looks like there are individual links around everything on only one of the boxes. seems to happen usually when the page is loaded for the first time, so you might see it. will vanish on page reload.)

i guess browsers make it work like the lots of other bad html-code because they try to honor the developer-intent if specifications are broken. 

this is why i believe the option &lt;strong&gt;&quot;change &lt;a&gt;&quot; is the most sensible&lt;/strong&gt; to include in html5
- it is quite backwards compatible
- is usable immediately (with a little caution)
- doesn&#039;t make understanding/writing html any harder
- legalizes code which most people don&#039;t even know to be invalid
- solves many or all of the otherwise &quot;impossible&quot; cases (depending on whether its allowed only around usual block-elements or special cases like &lt;tr&gt; or &lt;td&gt; as well)
- has no real argument against it (does it worsen anything?)
- seems easy to implement

the option &lt;strong&gt;&quot;href everywhere&quot; is clearly and by far the one best solution&lt;/strong&gt; (from the code, web-user and developer-standpoint at least), but sadly it would take years to become usable.

-&gt; hey why not simply integrate both – &lt;a&gt; for short term, href everywhere for long term? :)</description>
		<content:encoded><![CDATA[<p><a href="http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-398941" rel="nofollow">bruce:</a> actually i use &lt;a&gt; around block-elements simliarly to your (first) test <a href="http://analythis.com/arbeitsproben/uebersicht-design-arbeitsproben.html" rel="nofollow">on my own site</a> (because i wanted &lt;h2&gt; in it and the full box linked and i was lazy) and noticed only rarely a small rendering-problem in ff. (it then looks like there are individual links around everything on only one of the boxes. seems to happen usually when the page is loaded for the first time, so you might see it. will vanish on page reload.)</p>
<p>i guess browsers make it work like the lots of other bad html-code because they try to honor the developer-intent if specifications are broken. </p>
<p>this is why i believe the option <strong>&#8220;change &lt;a&gt;&#8221; is the most sensible</strong> to include in html5<br />
- it is quite backwards compatible<br />
- is usable immediately (with a little caution)<br />
- doesn&#8217;t make understanding/writing html any harder<br />
- legalizes code which most people don&#8217;t even know to be invalid<br />
- solves many or all of the otherwise &#8220;impossible&#8221; cases (depending on whether its allowed only around usual block-elements or special cases like &lt;tr&gt; or &lt;td&gt; as well)<br />
- has no real argument against it (does it worsen anything?)<br />
- seems easy to implement</p>
<p>the option <strong>&#8220;href everywhere&#8221; is clearly and by far the one best solution</strong> (from the code, web-user and developer-standpoint at least), but sadly it would take years to become usable.</p>
<p>-&gt; hey why not simply integrate both – &lt;a&gt; for short term, href everywhere for long term? :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bruce</title>
		<link>http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-398941</link>
		<dc:creator>bruce</dc:creator>
		<pubDate>Thu, 07 Aug 2008 16:53:20 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=918#comment-398941</guid>
		<description>Here&#039;s a test page I made to show some friends. Green borders are divs.

http://www.brucelawson.co.uk/tests/anchors-wrapping-blocks.htm

In all the big 4 browsers, the first test (of a news page &quot;teaser&quot;) works. The second test fails as the inner anchor closes the nest.

(Did you get an email from me a couple of weeks ago about this? My mail server has been wobblier than a toddler&#039;s tooth, so it&#039;s possible it never got to you.)</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a test page I made to show some friends. Green borders are divs.</p>
<p><a href="http://www.brucelawson.co.uk/tests/anchors-wrapping-blocks.htm" rel="nofollow">http://www.brucelawson.co.uk/tests/anchors-wrapping-blocks.htm</a></p>
<p>In all the big 4 browsers, the first test (of a news page &#8220;teaser&#8221;) works. The second test fails as the inner anchor closes the nest.</p>
<p>(Did you get an email from me a couple of weeks ago about this? My mail server has been wobblier than a toddler&#8217;s tooth, so it&#8217;s possible it never got to you.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Meyer</title>
		<link>http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-398622</link>
		<dc:creator>Eric Meyer</dc:creator>
		<pubDate>Wed, 06 Aug 2008 14:13:03 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=918#comment-398622</guid>
		<description>That&#039;s one of the possible solutions mentioned in the &lt;a href=&quot;http://meyerweb.com/eric/html-xhtml/html5-linking.html&quot; rel=&quot;nofollow&quot;&gt;proposal document&lt;/a&gt; (&quot;Change &lt;code&gt;a&lt;/code&gt; so that it can wrap around any arbitrary collection of elements&quot;), &lt;a href=&quot;http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-398568&quot; rel=&quot;nofollow&quot;&gt;Bruce&lt;/a&gt;.   I should add a link from the demo to the proposal, shouldn&#039;t I?

Very, very interesting that all browsers allow wrapping &lt;code&gt;a&lt;/code&gt; around block elements, since they should terminate the inline element as soon as the first block opening tag is reached---and I know that Gecko used to do this, even if it doesn&#039;t now.  It used to be required by (X)HTML parsing rules.  Did that change when I wasn&#039;t looking?</description>
		<content:encoded><![CDATA[<p>That&#8217;s one of the possible solutions mentioned in the <a href="http://meyerweb.com/eric/html-xhtml/html5-linking.html" rel="nofollow">proposal document</a> (&#8220;Change <code>a</code> so that it can wrap around any arbitrary collection of elements&#8221;), <a href="http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-398568" rel="nofollow">Bruce</a>.   I should add a link from the demo to the proposal, shouldn&#8217;t I?</p>
<p>Very, very interesting that all browsers allow wrapping <code>a</code> around block elements, since they should terminate the inline element as soon as the first block opening tag is reached&#8212;and I know that Gecko used to do this, even if it doesn&#8217;t now.  It used to be required by (X)HTML parsing rules.  Did that change when I wasn&#8217;t looking?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bruce</title>
		<link>http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-398568</link>
		<dc:creator>bruce</dc:creator>
		<pubDate>Wed, 06 Aug 2008 11:14:45 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=918#comment-398568</guid>
		<description>There is another alternative: change the spec to allow the &lt;a&gt; element to surround block level elements. All the browsers allow this &lt;a&gt;&lt;h1&gt;&lt;/h1&gt;&lt;img /&gt;&lt;p&gt;&lt;/p&gt;&lt;/a&gt; (firefox gets a bit wierd with underlining).

They fall down if there&#039;s nested &lt;a&gt;s, as each browser closes the outer &lt;a&gt; with the inner &lt;a&gt; closing, so this

&lt;a href=&quot;#&quot;&gt;&lt;p&gt;Mary had a &lt;a href=&quot;http://www.google.com\&quot;&gt;little&lt;/a&gt; lamb&lt;/p&gt;&lt;/a&gt;


has no linkage on the word &quot;lamb&quot; in any browser. 

It&#039;s not as succinct as href anywhere, I agree.</description>
		<content:encoded><![CDATA[<p>There is another alternative: change the spec to allow the &lt;a&gt; element to surround block level elements. All the browsers allow this &lt;a&gt;&lt;h1&gt;&lt;/h1&gt;&lt;img /&gt;&lt;p&gt;&lt;/p&gt;&lt;/a&gt; (firefox gets a bit wierd with underlining).</p>
<p>They fall down if there&#8217;s nested &lt;a&gt;s, as each browser closes the outer &lt;a&gt; with the inner &lt;a&gt; closing, so this</p>
<p>&lt;a href=&quot;#&quot;&gt;&lt;p&gt;Mary had a &lt;a href=&quot;http://www.google.com\&quot;&gt;little&lt;/a&gt; lamb&lt;/p&gt;&lt;/a&gt;</p>
<p>has no linkage on the word &quot;lamb&quot; in any browser. </p>
<p>It&#8217;s not as succinct as href anywhere, I agree.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Meyer</title>
		<link>http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-396637</link>
		<dc:creator>Eric Meyer</dc:creator>
		<pubDate>Thu, 31 Jul 2008 09:59:37 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=918#comment-396637</guid>
		<description>&lt;a href=&quot;http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-396361&quot; rel=&quot;nofollow&quot;&gt;Mike&lt;/a&gt;: because if I don&#039;t go to the effort, then there&#039;s no chance of it happening.  At least if I try, there&#039;s a non-zero chance of success, however small that chance may be.</description>
		<content:encoded><![CDATA[<p><a href="http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-396361" rel="nofollow">Mike</a>: because if I don&#8217;t go to the effort, then there&#8217;s no chance of it happening.  At least if I try, there&#8217;s a non-zero chance of success, however small that chance may be.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Schinkel</title>
		<link>http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-396361</link>
		<dc:creator>Mike Schinkel</dc:creator>
		<pubDate>Tue, 29 Jul 2008 19:46:54 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=918#comment-396361</guid>
		<description>Nice, and I&#039;m 100% supportive of your proposal.  No matter though, Ian and Lachlan will either ignore it or veto it, so why go to all the effort?</description>
		<content:encoded><![CDATA[<p>Nice, and I&#8217;m 100% supportive of your proposal.  No matter though, Ian and Lachlan will either ignore it or veto it, so why go to all the effort?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head profile="http://gmpg.org/xfn/1">
<title>meyerweb.com</title>
<link rel="openid.server" href="http://www.myopenid.com/server">
<link rel="openid.delegate" href="http://emeyer.myopenid.com/">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link rel="shortcut icon" href="/favicon.ico"><link rel="home" href="http://meyerweb.com/" title="Home" ><link rel="stylesheet" href="http://meyerweb.com/ui/meyerweb.css" type="text/css" media="screen, projection"><link rel="stylesheet" href="http://meyerweb.com/ui/theme.css" type="text/css" media="screen, projection" id="themeLink"><link rel="stylesheet" href="http://meyerweb.com/ui/print.css" type="text/css" media="print"><script src="http://meyerweb.com/ui/addresses.js" type="text/javascript"></script><link rel="stylesheet" href="/ui/wordpress.css" type="text/css" media="screen">
<link rel="stylesheet" href="/ui/tfe.css" type="text/css" media="screen">
<link rel="stylesheet" href="/ui/home.css" type="text/css" media="screen">
<link rel="alternate" type="application/rss+xml" title="Thoughts From Eric" href="/eric/thoughts/rss2/full" />
<link rel="alternate" type="application/rss+xml" title="Thoughts From Eric (only technical posts)" href="/eric/thoughts/category/tech/rss2/full" />
<link rel="alternate" type="application/rss+xml" title="Thoughts From Eric (only personal posts)" href="/eric/thoughts/category/personal/rss2/full" />
<link rel="alternate" type="application/rss+xml" title="Distractions" href="/eric/thoughts/recent-links/rss2" />
<link rel="alternate" type="application/rss+xml" title="Excuse of the Day" href="/feeds/excuse/rss20.xml" />
</head>
<body id="www-meyerweb-com" class="hpg">

<div id="sitemast"><h1><a href="/"><span>meyerweb</span>.com</a></h1></div><div id="search"><h4>Exploration</h4><!-- SiteSearch Google --><form method="get" action="http://www.google.com/custom" target="_top"><div><input type="hidden" name="domains" value="meyerweb.com"></input><label for="sbb" style="display: none">Submit search form</label><input type="submit" name="sa" value="Google Search" id="sbb"></input><label for="sbi" style="display: none">Enter your search terms</label><input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input><p><input type="radio" name="sitesearch" value="meyerweb.com" checked id="ss1"></input><label for="ss1" title="Search meyerweb.com">meyerweb.com</label><input type="radio" name="sitesearch" value="" id="ss0"></input><label for="ss0" title="Search the Web">Web</label></p><input type="hidden" name="client" value="pub-3772084027748653"></input><input type="hidden" name="forid" value="1"></input><input type="hidden" name="ie" value="ISO-8859-1"></input><input type="hidden" name="oe" value="ISO-8859-1"></input><input type="hidden" name="safe" value="active"></input><input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input><input type="hidden" name="hl" value="en"></input></div></form><!-- SiteSearch Google --><!-- <form method="get" action="http://www.google.com/custom"><div><input type="submit" name="sa" value="Search"><input type="text" name="q" size="20" maxlength="255" value=""><input type="hidden" name="sitesearch" value="meyerweb.com"></div></form><small><a href="http://www.google.com/search">Powered by Google</a></small> --></div><div id="main"><div class="skipper">Skip to: <a href="#extra">site navigation/presentation</a></div><div class="skipper">Skip to: <a href="#thoughts">Thoughts From Eric</a></div>
<div id="thoughts">


<div class="entry">
<h3><a href="http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/" rel="bookmark" title="Permanent Link: Any-Element Linking Demo">Any-Element Linking Demo</a></h3>
<ul class="meta">
<li class="date">Wed 23 Jul 2008</li>
<li class="time">1411</li>
<li class="cat"><a href="http://meyerweb.com/eric/thoughts/category/tech/xhtml/" title="View all posts in (X)HTML" rel="category tag">(X)HTML</a><br> <a href="http://meyerweb.com/eric/thoughts/category/tech/javascript/" title="View all posts in JavaScript" rel="category tag">JavaScript</a></li>
<li class="cmt"><a href="http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comments">66 responses</a></li>
<li></li><li></li></ul>

<div class="text">
<p>
In support of the <a href="http://meyerweb.com/eric/html-xhtml/html5-linking.html">still-to-be-finished proposal</a> for allowing most HTML 5 elements to become hyperlinks, I&#8217;ve written a <a href="http://meyerweb.com/eric/html-xhtml/html5-linking-demo.html">quick proof-of-concept demo</a> for your perusal.  Basically, it&#8217;s a page with some JavaScript that captures the whole document tree, looks for any elements with an <code>href</code> attribute, and then sprinkles some events on those elements in order to make them act like hyperlinks.  There&#8217;s also some CSS that applies old-school link presentation to said elements (blue and underlined, baby!).  I&#8217;m using <code>href</code> because it was the easiest thing to do.
</p>
<p>
I&#8217;m sure I could have written a more elegant script (and <em>yes</em>, I <em>know</em>, your favorite JS framework would done it in half the lines and seventeen times the page weight) and I suspect there are some things I&#8217;m missing.  I&#8217;ll be interested to hear what those may be.  Meanwhile, if you want to try out your own arbitrary-element linking, grab a copy of the demo and edit the markup to your heart&#8217;s content.  Or you could suck out the JS and apply it to your own test pages.  Your call.
</p>
<p>
The demo works fine in Firefox 2, Camino 1.5, Safari 2, and Opera 9.2.  I didn&#8217;t test it in anything else.  It may well fail spectacularly in every other browser known to man and dog.  That&#8217;s not really an issue, though.  The goal here is to have a working demonstration, not a universal solution.  (The latter may come later.)  It&#8217;s a handy way to show people how browsers should behave in an arbitrary-link world.
</p>
<p>
The one thing that didn&#8217;t go right is the status-bar URL handling when hovering over a linked element (other than an <code>a</code> element) that descends from another linked element.  For some reason the descendant&#8217;s URL never shows up in the status bar.  I&#8217;m sure there&#8217;s an easy fix.  I regard this as a minor issue.  <em>[<strong>Update 7/23:</strong> this has been fixed <a href="http://meyerweb.com/eric/thoughts/2008/07/23/any-element-linking-demo/#comment-395045">thanks to Allwyn Fernandez</a>.]</em>
</p>
<p>
The biggest thing that&#8217;s missing is simulating &#8220;visited&#8221; styles on non-<code>a</code> elements; in this case, turning them purple.  That would require mining the history and dynamically adding classes and, well, all kinds of stuff.  I&#8217;m sure it&#8217;s possible.  I&#8217;m also sure that I don&#8217;t have the time right now to figure out how to do it well.  Besides, ship early, ship often, right?
</p>
<p>
As I said before, I&#8217;m very interested to know what people think of the demonstrated behavior and how it might be improved.  And hey, if anyone wants to contribute improvements to the JS, I&#8217;ll do my best to keep up.
</p>
<p>
One more step toward a concrete proposal&#8230;
</p>
</div>

</div>

</div>
<p style="font-size: 90%; text-align: right; margin-top: 0.5em; padding-top: 0;">(If you care, there's even an <a href="/eric/thoughts/page/2/">archive of previous thoughts</a>...)</p>

</div><div id="extra"><div class="panel" id="archipelago"><h4>Identity Archipelago</h4><ul><li><a href="http://flickr.com/photos/meyerweb/" rel="me">Flickr</a></li><li><a href="http://twitter.com/meyerweb/" rel="me">Twitter</a></li><li><a href="http://dopplr.com/traveller/meyerweb">Dopplr</a></li><li><a href="http://www.linkedin.com/in/meyerweb" rel="me">LinkedIn</a></li><li><a href="http://technorati.com/profile/emeyer" rel="me">Technorati</a></li></ul></div><div class="panel" id="pointers"><h4>Projects Elsewhere</h4><ul><li><a href="http://aneventapart.com/">An Event Apart</a></li><li><a href="http://complexspiral.com/">Complex Spiral Consulting</a></li><li><a href="http://www.webassist.com/go/css/emeyer/">CSS Sculptor</a></li><li><a href="http://css-discuss.org/">css-discuss</a></li><li><a href="http://microformats.org/">Microformats</a></li><li><a href="http://s5project.org/">S5</a></li></ul></div><div class="panel" id="tour"><ul><li><a href="http://fray.com/issue3/"><img src="http://fray.com/images/i3c.gif" alt="Fray Contributor (Issue 3: Sex &amp; Death)" /></a></li><!-- <li><a href="http://www.webassist.com/go/css/emeyer/"><img src="/pix/CS_ad_180x109.jpg" alt="CSS Sculptor for Dreamweaver" style="max-width: 100%;" /></a></li> --></ul></div><div class="panel">
<h4>Recently Tweeted</h4>
<p class="more"><a href="http://twitter.com/meyerweb">see more</a></p>
<p>Saw a temporary license plate with expiration date MAR3010 and thought of <a href="http://twitter.com/t">@t</a>. <small>&#8211;tweeted 7 hours, 20 minutes ago</small></p>
</div><div id="sideblog" class="panel">
<h4>Distractions</h4>
<p class="more">
<a href="/eric/thoughts/recent-links/">archive</a>
</p>
<ul>
<li><a href="http://tweetagewasteland.com/2010/03/my-head-is-in-the-cloud/" title="March 18 | &#8220;I sense that my addiction to the realtime stream is only making room for the consumption of a faster stream.&#8221;">My Head is in the Cloud</a> <small>[via <a href="http://daringfireball.net/">John</a>]</small></li>
<li><a href="http://8bitnyc.com/" title="March 17 | All of a sudden I want to establish a mission in Central Park and negotiate with the natives for gold and food.">8-Bit NYC</a></li>
<li><a href="http://www.youtube.com/watch?v=nFicqklGuB0&amp;feature=player_embedded" title="March 12 | Wry comment expressing my appreciation of the creative derivativeness of this video and its uncanny accuracy in mocking common tropes.">Academy Award Winning Movie Trailer</a></li>
<li><a href="http://www.youtube.com/watch?v=414TmP12WAU" title="March 9 | &#8220;Apple juice&#8230; for half price!&#8221;  More like twice PRICELESS.  (Note: If you&#8217;re at work, don your headphones.)">Happy in Paraguay</a> <small>[via <a href="http://unstoppablerobotninja.com/">Ethan</a>]</small></li>
<li><a href="http://www.youtube.com/watch?v=9V5ubAOeOBk&amp;feature=player_embedded" title="February 10 | This is approximately the best thing ever.">U900 -Walk Don&#8217;t Run (Isogabamaware)</a></li>
<li><a href="http://www.456bereastreet.com/archive/201002/sifr_default_css_hides_content_from_at_least_one_screen_reader/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A 456bereastreet %28456 Berea Street%29" title="February 8 | -9999px comes through again, but I really wish we were beyond that kind of thing.">sIFR default CSS hides content from at least one screen reader</a></li>
<li><a href="http://www.macosxhints.com/article.php?story=20100117064356428" title="February 8 | Storing this for future use.">Take a picture with the iSight camera when a folder is opened</a></li>
<li><a href="http://mingle2.com/blog/view/web-developer-mind" title="February 4 | Mostly valid.  (SEE WHAT I DID THERE?)">The Mind of a Web Developer: An Illustrated Diagram</a></li>
<li><a href="http://www.theonion.com/content/news/science_channel_refuses_to_dumb" title="January 28 | &#8220;Punkin Chunkin, for Christ&#8217;s sake&#8230; What more do you people want?&#8221;">Science Channel Refuses To Dumb Down Science Any Further</a></li>
<li><a href="http://www.mailchimp.com/blog/project-omnivore-declassified/" title="January 27 | Sounds like quite a feat.  But I wonder how we&#8217;d feel if Microsoft or Google announced the same kind of thing on their e-mail services.">MailChimp&#8217;s Project Omnivore: Declassified</a></li>
<li><a href="http://www.politifact.com/truth-o-meter/statements/2010/jan/25/carolyn-maloney/congresswoman-says-democratic-presidents-create-mo/" title="January 26 | &#8220;Obviously, luck matters a lot, but when there is a consistent pattern over more than 60 years, it starts to look like more than just luck.&#8221;">Congresswoman says Democratic presidents create more private-sector jobs</a></li>
<li><a href="http://www.ted.com/talks/taylor_mali_what_teachers_make.html" title="January 25 | Truth.">Taylor Mali: What teachers make</a></li>
<li><a href="http://notebook.johnmartz.com/how-websites-work?c=1" title="January 22 | At last, the truth is out and I can stop pretending:  beatific monkeys are what makes it all go.">How websites work</a></li>
</ul>
</div>
<div class="panel" id="advisory">
<div class="guarded">
<a href="http://blogadvisorysystem.com/"><img src="/pix/bas/guarded.png" alt="Blog Advisory System Alert Level: Guarded"></a>
</div>
</div>

<div class="panel" id="excuse">
<h4>The <a href="/feeds/excuse/">excuse of the day</a> is</h4>
<p>Internet 1 traffic is being routed onto Internet 2</p>
</div>

<div class="panel" id="extras">
<h4>Extras</h4>
<ul>
<li><a href="/feeds/">Feeds</a> &#8226;</li>
<li><a href="/eric/faq.html">FAQ</a> &#8226;</li>
<li><a href="/family.html">Family</a></li>
</ul>
</div>

</div>

<div id="navigate">
<h4>Navigation</h4>
<ul id="navlinks">
<li id="archLink"><a href="/eric/thoughts/">Archives</a></li>
<li id="cssLink"><a href="/eric/css/">CSS</a></li>
<li id="toolsLink"><a href="/eric/tools/">Toolbox</a></li>
<li id="writeLink"><a href="/eric/writing.html">Writing</a></li>
<li id="speakLink"><a href="/eric/talks/">Speaking</a></li>
<li id="otherLink"><a href="/other/">Leftovers</a></li>
<li id="aboutsite"><a href="/ui/about.html">About this site</a></li>
</ul>
</div>

<div id="footer">
<p class="sosumi">All contents of this site, unless otherwise noted, are &copy;1995-2008 <strong>Eric A. and Kathryn S. Meyer</strong>.  All Rights Reserved.</p>
<p>"<a href="/eric/thoughts/">Thoughts From Eric</a>" is powered by the &uuml;bercool <a href="http://wordpress.org/">WordPress</a></p>
</div>
</body>
</html>
