<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>DOM Scripting comments: Going off the rails</title>
        <link>http://domscripting.com/blog/display/49</link>
        <description>Rails is great, but why, oh, why does it add obtrusive inline event handlers?</description>
        <language>en</language>
        <item>
            <title>Brian Sweeting</title>
            <link>http://domscripting.com/blog/display.php/49#comment255</link>
            <content:encoded><![CDATA[<p>I noticed IconBuffet (a RoR app), uses accessible AJAX links.  Even though the javascript is inline, it at least degrades nicely when scripting is not enabled.  This behavior should be the default in Rails.</p>
]]></content:encoded>
            <pubDate>Wed, 01 Mar 2006 05:58:44 GMT</pubDate>
        </item>
        <item>
            <title>Dustin Diaz</title>
            <link>http://domscripting.com/blog/display.php/49#comment254</link>
            <content:encoded><![CDATA[<p>Indeed, href=&quot;#&quot; is an accessibility nightmare. I mean, who cares (at this point) if JavaScript is inline. Yes, unobtrusive would be ideal at its best, but it&#8217;s not like we can achieve the accessible webpage via this.href from an onclick event handler directly on the anchor element. But for the record, I did not directly advocate the use of inline JavaScript, I&#8217;m just saying it can still exist and not screw accessibility.</p>
]]></content:encoded>
            <pubDate>Sun, 19 Feb 2006 03:15:15 GMT</pubDate>
        </item>
        <item>
            <title>Jason Kitcat</title>
            <link>http://domscripting.com/blog/display.php/49#comment252</link>
            <content:encoded><![CDATA[<p>Looking at Basecamp&#8217;s HTML this was the one thing that gave me pause for thought - I&#8217;m glad to see you highlight this issue Jeremy.</p>

<p>While David may be right that Rails doesn&#8217;t prevent the better way of doing scripting, it certainly isn&#8217;t the convention, it would be extra work. David knows how important conventions are and should work accordingly.</p>

<p>Rails has a lot to recommend it but they really need to practise what they preach with the use of accessible JS - onClick is <em>just so last year</em>.</p>
]]></content:encoded>
            <pubDate>Wed, 15 Feb 2006 15:12:36 GMT</pubDate>
        </item>
        <item>
            <title>Jeremy Keith</title>
            <link>http://domscripting.com/blog/display.php/49#comment251</link>
            <content:encoded><![CDATA[<p>David, no, you&#8217;re missing the point. This isn&#8217;t simply a matter of aesthetics, it&#8217;s a matter of accessibility. The fact that the JavaScript helpers add inline event handlers isn&#8217;t itself the problem: the bigger issue is that the links are completely useless without JavaScript (they use href=&quot;#&quot;).</p>

<p>This is about far, far more than &quot;a matter of purity of the resulting HTML for the human eye.&quot; As Dan asked, &quot;What happens when the user doesn’t have a new browser or has script disabled? What do search engines index?&quot;</p>

<p>That&#8217;s where the JavaScript helpers could be improved. If they could add JavaScript as a <em>progressive enhancement</em>, then the functionality would degrade gracefully.</p>

<p>If this really were simply a matter of HTML purity, then I would agree that it would be relatively unimportant. But that&#8217;s not the issue.</p>

<p>For a quick primer on the concept of unobtrusive JavaScript as it relates to graceful degradation &#8212; and without wanting to hijack this into pimping my own kool-aid &#8212; you can read the sample chapter from my book, which covers this very topic:</p>

<p><a href="http://domscripting.com/book/sample/">http://domscripting.com/book/sample/</a></p>
]]></content:encoded>
            <pubDate>Wed, 15 Feb 2006 10:03:15 GMT</pubDate>
        </item>
        <item>
            <title>David Heinemeier Hansson</title>
            <link>http://domscripting.com/blog/display.php/49#comment250</link>
            <content:encoded><![CDATA[<p>Hey guys. It&#8217;s great to see passion around wanting to improve the use of Javascript in Rails. Love it. But let&#8217;s keep beans and apples in separate pots. The Javascript helpers does <em>nothing</em> to prevent you from writing machine-readable HTML that&#8217;s easy to index and to provide script-powered ahrefs that also serves as normal links.</p>

<p>The charge is that Rails uses inline JS calls in the onclick, onsubmit, and other triggers. This does nothing to change the structure of the document (there&#8217;s no superflous tags or forcing of specific tags), but it does indeed lead to verbose attributes of said tags with that inline JS stuff.</p>

<p>So this is a matter of purity of the resulting HTML for the human eye. Nothing more. Mind you, though, that I care <em>deeply</em> about the beauty of code to the human eye, so I can most definitely sympathies with people desiring that the generated HTML be beautiful too. Which is of course why I say: Rock on!</p>

<p>But let&#8217;s be sure to keep things in perspective. There&#8217;s no need to pad the argument. Desiring beautiful HTML purely for aesthetic reasons is plenty motivation to attempt to improve ;)</p>
]]></content:encoded>
            <pubDate>Wed, 15 Feb 2006 05:34:23 GMT</pubDate>
        </item>
        <item>
            <title>JohnO</title>
            <link>http://domscripting.com/blog/display.php/49#comment249</link>
            <content:encoded><![CDATA[<p>I hope that your patch can be absorbed by DHH into the rails tree, and they can make an effort at truly having good javascript support.</p>
]]></content:encoded>
            <pubDate>Tue, 14 Feb 2006 14:02:53 GMT</pubDate>
        </item>
        <item>
            <title>Gareth</title>
            <link>http://domscripting.com/blog/display.php/49#comment248</link>
            <content:encoded><![CDATA[<p>As I voiced on Dans comments I have the same issue with that as well. Again I like rails but it&#8217;s fabled speed seems to be, in a few places, aimed more at rapid prototyping (not the JS library!) apps than building the finished thing. The latter taking more time than you might think.</p>

<p>And dont even mention the hideous linkButton asp.net control.</p>
]]></content:encoded>
            <pubDate>Tue, 14 Feb 2006 13:57:39 GMT</pubDate>
        </item>
        <item>
            <title>Daniel Stockman</title>
            <link>http://domscripting.com/blog/display.php/49#comment247</link>
            <content:encoded><![CDATA[<p>Your analysis is spot-on. I frequently use bits and pieces of Prototype unobtrusively (in both static and dynamic environs), and I am similarly disappointed by Rails&#8217; kludgy JS helpers. I won&#8217;t presume to scoff at how &quot;easy&quot; this would be to implement, but I will look after this patch-effort with great interest.</p>
]]></content:encoded>
            <pubDate>Tue, 14 Feb 2006 00:13:17 GMT</pubDate>
        </item>
        <item>
            <title>Eric Miraglia</title>
            <link>http://domscripting.com/blog/display.php/49#comment246</link>
            <content:encoded><![CDATA[<p>This is an important issue not just for developers who care about the &quot;purity of their HTML,&quot; but also, as Dan is suggesting, for people contributing content in application spaces that need to be indexable by search engines at Yahoo, Microsoft, and&#8230;oh, drat&#8230;what&#8217;s that other one?  The machine has become a crucial part of our audience, because the way the searchbot reads our text determines to a lare extent whether we get access to a human audience; search has become the principle gateway to edge content, and we depend on simple, machine-readable HTML to help searchbots help readers find the creative work we post in &quot;edge systems&quot; (many of which, for good reason, are written in Rails).</p>

<p>Most of the people creating content at the edge don&#8217;t fully understand the nuances of audience-acquisition in the Googleocracy&#8230;it&#8217;s up to developers to make sure that this is as straightforward as possible.</p>
]]></content:encoded>
            <pubDate>Mon, 13 Feb 2006 23:01:14 GMT</pubDate>
        </item>
   </channel>
</rss>