<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Reinventing Fire &#187; CDF</title>
	<atom:link href="http://schepers.cc/category/cdf/feed" rel="self" type="application/rss+xml" />
	<link>http://schepers.cc</link>
	<description>Technology upside down and backwards</description>
	<lastBuildDate>Sun, 09 Oct 2011 19:47:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Pointers on Background of SVG Borders on Mutiny</title>
		<link>http://schepers.cc/css-in-svg</link>
		<comments>http://schepers.cc/css-in-svg#comments</comments>
		<pubDate>Sat, 21 Aug 2010 21:37:09 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[CDF]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[SVG 2]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=340</guid>
		<description><![CDATA[<br/>With SVG being integrated more and more into HTML5, both included via &#60;object&#62; and &#60;img&#62; elements, and inline in the same document, some natural questions about SVG and CSS are receiving more focus. This includes box model questions like background and border, and pointer events. I&#8217;m interested in comments from the community on what direction [...]]]></description>
			<content:encoded><![CDATA[<br/><p>With SVG being integrated more and more into HTML5, both included via <code>&lt;object&gt;</code> and <code>&lt;img&gt;</code> elements, and inline in the same document, some <a href="http://lists.w3.org/Archives/Public/www-svg/2010Aug/thread.html#msg28">natural questions</a> about SVG and CSS are receiving more focus.  This includes box model questions like background and border, and pointer events.</p>
<p>I&#8217;m interested in comments from the community on what direction SVG should take.</p>
<p><span id="more-340"></span></p>
<p>It&#8217;s pretty clear that the intent of the SVG 1.1 spec was that the box-model CSS properties must not apply to any SVG elements.  In addition to what the spec states on the subject, my conversations with people who participated in the SVG WG at the time leave me with no doubt on the matter.</p>
<p>The question is, is that the behavior we want?  How hard or easy is it to change that in modern SVG+HTML+CSS implementations?  What is most useful and intuitive for content authors?</p>
<p>In my opinion, we could specify that some aspects of the box model apply without screwing with SVG&#8217;s coordinate-based positioning system.  Here are my initial thoughts on some specific properties:</p>
<h4>Borders</h4>
<p>A borders is different than a stroke.  An SVG element, including any graphical (<code>&lt;rect&gt;</code>, <code>&lt;circle&gt;</code>, <code>&lt;path&gt;</code>, etc.) or container element (<code>&lt;svg&gt;</code>, <code>&lt;g&gt;</code>) can have both a stroke (which conforms to the geometry) and a border (which conforms to the element&#8217;s bounding box).  A common use case is setting the graphics apart from other content, or doing mouseover highlights of an SVG element; for example, when I mouse over or focus a circle, it would be much nicer, and just as semantic, to simply have a CSS property draw a rectangle around that element as a highlight than for me to generate a rectangle based on the bbox and insert that into the DOM, keep a pointer to it, then remove it when I mouse out.</p>
<p>Paint servers and similar resources (gradients, filters, etc.) should not have any border.  Note: <code>&lt;defs&gt;</code> is a non-rendering element, akin to <code>&lt;head&gt;</code>, so no border would be visible for that either, but if the content of a <code>&lt;defs&gt;</code> is <code>&lt;use&gt;</code>d, any border properties would apply in the same manner as for other properties.</p>
<p>The border should not have any effect on the layout or rendering; it would be strictly visual.</p>
<h4>Margin</h4>
<p>No effect on SVG content, but may affect HTML content around that SVG content.  So, an <code>&lt;svg&gt;</code> element with <code>'margin: 20px;'</code>  has a 20-pixel gap around the SVG content, just as if it were <code>&lt;img style="margin: 20px;"/&gt;</code></p>
<p>Alternately, maybe margin only has an effect for <code>&lt;svg&gt;</code> elements; that might be simpler to specify, implement, and understand for content authors.</p>
<h4>Padding</h4>
<p>Again, this has no effect on SVG content, but it does affect how the border is drawn.  This would be a nice way to compensate for thick stroke widths.</p>
<h4>Background</h4>
<p>A background is different than a fill.  Background is much the same as border; it is a rectangle (modulo the border-radius effects) around the shape, based on its geometric bounding box, taking into account padding.</p>
<p>By default, there should be no background color, including for the <code>&lt;svg&gt;</code> element.  Right now, there is a <a href="https://lists.webkit.org/pipermail/webkit-unassigned/2009-July/120301.html ">WebKit bug in Chrome and Safari</a> which renders a white, non-transparent background for SVG fragments or documents; this is a major pain for any content creators trying to use SVG, much like the old Internet Explorer bug on transparency in PNGs.  I hope it receives some attention from the WebKit developers soon.</p>
<p>SVG Tiny 1.2 defines a <a href="http://www.w3.org/TR/SVGTiny12/painting.html#viewport-fill-property"><code>'viewport-fill'</code></a>  and <a href="http://www.w3.org/TR/SVGTiny12/painting.html#viewport-fill-opacity-property"><code>'viewport-fill-opacity'</code></a>.  I think those should be deprecated in favor of <code>'background'</code>  properties; I have no opinion on which should have precedence&#8230; maybe they should be seen as aliases of <code>'background'</code>, if that makes it simpler.</p>
<p>A background on SVG content raises the question of pointer events, which is also relevant to borders.</p>
<h4>Pointer Events</h4>
<p>Should pointer events on the border or background fire on the element itself?  I think that the default should be &#8220;no&#8221;, just to be safe and consistent with older SVG content, but I could easily be persuaded to reverse that.  Either way, there should be a new property or set of properties that can modify this, in a manner consistent with how CSS is defining <code>'pointer-events'</code>.</p>
<p>This touches on the question, asked in a related thread, on whether the <code>&lt;svg&gt;</code> element, by default, should be a proximal event target for pointer events.  My answer on that is a pretty firm &#8220;no&#8221;; if you want to have it as an event target, give it a background, or change the <code>'pointer-events'</code>  value.</p>
<h4>Questions</h4>
<p>A few high level questions:</p>
<ul>
<li><strong>Is this a change from SVG 1.1 and SVG Tiny 1.2?</strong>  Yes.</li>
<li><strong>Is this backwards compatible?</strong>  Kind of.  It introduces new behavior that is not consistent with past behavior, but doesn&#8217;t explicitly change very much.</li>
<li><strong>Does this break existing content?</strong>  Very doubtful.</li>
<li><strong>Is this intuitive for content authors?</strong>  My intuition says yes.</li>
<li><strong>Does this match existing implementations?</strong>  Some, at least.</li>
<li><strong>Does this provide value for content authors?</strong> Yes.</li>
<li><strong>Does this make it harder to implement?</strong>  I don&#8217;t know; I suspect it makes it easier for at least some implementations.</li>
<li><strong>Would defining this improve interoperability?</strong>  Yes.</li>
</ul>
<h4>Conclusion</h4>
<p>I propose we change SVG 2 to explicitly define this behavior.  As the editor of the HTML5 spec, <a href="http://lists.w3.org/Archives/Public/www-svg/2010Aug/0048.html">Hixie seems to imply</a> that this is not for HTML5 to define, and I tend to agree with that, though maybe some informative mention in the HTML5 or CSS specs for how SVG treats margins and padding might be appropriate.  We recently <a href="http://lists.w3.org/Archives/Public/public-cdf/2010Aug/0000.html">formally closed</a> the <a href="http://www.w3.org/2004/CDF/">Compound Document Formats Working Group</a>, which was formed to look at exactly these sorts of questions, and published its specifications as Working Group Notes for posterity; we wanted to be clear about its status.  The CDF WG succumbed to the politics around the reformation of the HTML WG, and probably to good effect overall; but in its absence, we still need to resolve these questions by cooperation between the various groups involved.</p>
<p>I don&#8217;t think this should be any different in standalone SVG files than in SVG files referenced or inlined in HTML.  That would be very unintuitive, in my opinion.</p>
<p>If this is not controversial, I would be happy to put any or all of this in the <a href="http://dev.w3.org/SVG/modules/integration/SVGIntegration.html">SVG Integration spec</a>, which is one of the foundations of SVG 2.  If someone disagrees with this, we&#8217;ll have to talk about it before I start editing the spec.  In either case, it would need to be fleshed out some&#8230; I&#8217;m probably glossing over some possible stumbling blocks in the box model, which I&#8217;d appreciate feedback on.</p>
<p>Please leave a comment if you like my suggestions, if you see a flaw, or have a better suggestion.</p>
<h4 id="update1">Update:</h4>
<p>Just to show what I&#8217;m talking about, I created a sample.  Here is a good example of a bad example; below are 3 instance of the same SVG with the same CSS background and border values, with a border width of 2px.  The first 2 are external files referenced as objects, the third is inline in the HTML (you won&#8217;t see this one unless you are using preview releases of Firefox 4, WebKit, or IE9); the second image also has a padding and margin of 10px.</p>
<p>I tested this in several browsers, and in the referenced cases, the border width increases the image size, spawning scrollbars; I don&#8217;t think that&#8217;s a good outcome&#8230; it should clip the border, just as it does for any graphical overflow&#8230; borders should not contribute to the geometry of SVG images.</p>
<p>In the second case, where I added padding, the argument is less clear, but I still believe that for referenced content, the border and background should not displace the rendered graphics, and should be clipped.  For inline content, it would make sense for the padding and margin to be visible in the rendered document, but it should still not change the geometry of the SVG.</p>
<p><object type="image/svg+xml" width="150" height="150" data="http://www.schepers.cc/svg/blendups/css/border-bg.svg">Please use a modern browser.</object></p>
<p><object type="image/svg+xml" width="150" height="150" data="http://www.schepers.cc/svg/blendups/css/border-bg-padding.svg">Please use a modern browser.</object></p>
<p><svg xmlns="http://www.w3.org/2000/svg" width="150" height="150" viewBox="0 0 50 50" style="border: 2px solid green; background-color: palegreen;"><circle cx="25" cy="25" r="20" fill="orange" stroke="red" style="border: 2px solid gold; background-color: yellow;"/></svg></p>
<p>We&#8217;d need to specify this in order for it to behave the same across browsers (and authoring tools).  So, do people agree or disagree with my conlcusions?</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/css-in-svg/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Web Audio Goes to Eleven</title>
		<link>http://schepers.cc/web-audio-goes-to-eleven</link>
		<comments>http://schepers.cc/web-audio-goes-to-eleven#comments</comments>
		<pubDate>Fri, 14 May 2010 18:58:42 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Audio]]></category>
		<category><![CDATA[CDF]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=212</guid>
		<description><![CDATA[<br/>I&#8217;m really excited about W3C&#8217;s new public Audio Incubator Group, just launched today, and open for collaborators, innovators, and instigators. Go take a look for yourself, and see if you can contribute. To celebrate the occasion, here&#8217;s a simple example of an experimental audio inteface, in the world&#8217;s first (and worst) audio synthesizer in SVG [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I&#8217;m really excited about W3C&#8217;s new public <a href="http://www.w3.org/2005/Incubator/audio/">Audio Incubator Group</a>, just launched today, and open for collaborators, innovators, and instigators.  Go take a look for yourself, and see if you can contribute.</p>
<p>To celebrate the occasion, here&#8217;s a simple example of an experimental audio inteface, in the world&#8217;s first (and worst) audio synthesizer in SVG (you&#8217;ll need a <a href="https://wiki.mozilla.org/Audio_Data_API#Obtaining_Code_and_Builds">special Minefield build</a> to use it).  Just click on the keyboard&#8230; it&#8217;s pretty rough still, but it shows some of the potential:</p>
<p><iframe src="http://schepers.cc/svg/keyboard.svg" class="aligncenter" scrolling="no" frameborder="0" width="478" height="190">Please use FF1.5+, Opera 9+, WebKit/Safari3.0+, or IE9+</iframe><br />
<em>(<a href="http://schepers.cc/svg/keyboard.svg">standalone SVG file</a>)</em></p>
<p>For some background, read on after this break&#8230;<br />
<span id="more-212"></span></p>
<h3>Background</h3>
<p>Years ago, I was one of several SVG developers interested in doing for audio what SVG did for graphics, and we <a href="http://tech.groups.yahoo.com/group/svg-developers/message/28154">talked</a> a bit about a format we called  <a href="http://uk.groups.yahoo.com/group/SynthML/">SynthML</a>.  The old Adobe SVG viewer included an audio element for MP3 playback, and I found it really useful for adding subtle sounds for button mouseovers, clicks, and other UI effects, so the idea of programmatic control of music on the Web had intrigued me for some time (anyone remember Thomas Dolby&#8217;s Beatnik?), for enhancing user interfaces, adding ambient background music, and providing full fledged music webapps. The SynthML effort fizzled out, and while there are some interesting music markup languages (most notably <a href="http://www.musicxml.org/xml.html">MusicXML</a>, which is more like the MathML of music), there hasn&#8217;t been much traction beyond simple recording playback.</p>
<p>That&#8217;s why I was so psyched when I saw what <a href="http://alistairgmacdonald.com/">Alistair MacDonald</a>, <a href="http://vocamus.net/dave/?cat=25">David Humphrey</a>, <a href="http://twitter.com/corban">Corban Brook</a>, and a few others were up to while attending a  Processing.js community event at <a href="http://loft.bocoup.com/">Bocoup</a>.  David hacked up a <a href="https://wiki.mozilla.org/Audio_Data_API#Obtaining_Code_and_Builds">special build</a> of Gecko to add script access to the raw audio stream of the HTML5 &lt;audio&gt; element, and Al, Corban, and friends were building <a href="http://weblog.bocoup.com/web-audio-all-aboard">cool demos</a> on top of it.</p>
<p>I immediately knew I wanted to see this as a part of the native functionality of the Web platform, across browsers.  In some ways, it&#8217;s the last major missing piece from the open Web&#8230; the ability to view source and hack sound, the last commonly digitizable sensorium. I also knew that I wanted the use cases and requirements to come from the larger community, the musicians and UI designers and developers who will ultimately be the ones using this functionality to sound out the depths of what&#8217;s possible on the Web (okay, I&#8217;m corny).  So, I talked with Corban, David, and Al, and we agreed that a public discussion forum would be the best way to connect with this community, to get them talking and experimenting and building and sharing.</p>
<p>Chris Blizzard of Mozilla was there too, co-sponsoring the event, and he was extremely supportive of getting this work started at W3C.  I wrote up a <a href="http://www.w3.org/2010/04/audio/audio-incubator-charter.html">charter</a> for a public incubator group, and started knocking on doors of the browser vendors, our other members, and the wider community who might be stakeholders, to drum up interest.  Pretty quickly, I got support from folks at the University of Rio (PUC-Rio), BBC, and Google; currently, a W3C Incubator Group takes a minimum of three W3C members to kick it off, though once it&#8217;s started, anyone can join.  With that nicety taken care of, W3C management approved the charter, and the new W3C Audio Incubator Group (or Audio XG) was launched today!</p>
<h3>Joining the Audio XG</h3>
<p>I invite anyone interested in audio, music, speech synthesis, games, or other related topics to get involved, <a href="http://www.w3.org/2005/Incubator/audio/wiki/Join_the_Audio_Incubator">join the Audio XG</a>, and start shaping the future of Web audio on the mailing list, and chat on the <a href="irc://irc.w3.org:6665#audio">#audio</a> IRC channel (irc.w3.org, port 6665, channel #audio).  Incubator participation is free and open to anyone who wants to help out.</p>
<h3>About the SVG Synth</h3>
<p>My SVG synthesizer is a true product of the Web.  I know next to nothing about music&#8230; I can&#8217;t play an instrument, can&#8217;t read music, don&#8217;t know music theory&#8230; I love music, but I&#8217;m a consumer, not a creator.  I&#8217;d love to change that, when I have time, but I&#8217;ll settle for now for enabling others.</p>
<p>So, when I decided to make something with the audio API, naturally my first thought was to do something I didn&#8217;t know how to do, for which I&#8217;m totally unqualified: create a synthesizer in SVG.</p>
<p>I started with the HTML example from the documentation for the <a href="https://wiki.mozilla.org/Audio_Data_API">experimental audio API</a> on the Mozilla wiki, and converted it to SVG (with a few missteps along the way).  As it turns out, the HTML5 audio interface is exposed in Gecko (the Firefox engine) even when there is no HTML content.  This was good news for me.  It made it even easier to programmatically create sound with it.  I suspect that this is something that lies outside any current specification, but it should be codified somewhere.</p>
<p>Next, I looked for a piano keyboard in SVG; I found a few on <a href="http://upload.wikimedia.org/wikipedia/commons/c/c0/Klaviatur-3-en.svg">Wikimedia Commons</a>, but they were not quite what I wanted (and in typical Inkscape fashion, were a little bloated), so ultimately I just made my own, which was trivial to do.</p>
<p>Next, I had to understand which notes each key should sound.  So I read a <a href="http://www.musictheory.halifax.ns.ca/3keyboard.html">lesson on keyboard basics</a>, which sufficed for my purpose.</p>
<p>Then I had to figure out what the frequency of each note is in Hertz (Hz), which is what the audio API understands.  It was no surprise that someone had published just such a <a href="http://www.phy.mtu.edu/~suits/notefreqs.html">table corresponding notes to frequency</a>, with the companion <a href="http://www.phy.mtu.edu/~suits/NoteFreqCalcs.html">equations for deriving them</a>.  </p>
<p>To put the pieces together, I took the simplest possible approach: I handcoded the keyboard (I could have instantiated it with script, because it&#8217;s very deterministic, but I favor declarative markup that can be tweaked in an authoring tool); I assigned an id to each key based on the note (C4, Af0-Bb0, etc., where &#8220;f&#8221;==&#8221;flat&#8221; and &#8220;b&#8221;==&#8221;sharp&#8221;, and the number denotes the octave); I then created an associative array with the note-id as the index and the frequency as the value, so I could look it up with the key&#8217;s id; then it was just a matter of sending the frequency to the script from the HTML example, and adding a duration timer.</p>
<p>Finally, just as a decorative flourish, I found a partial musical staff with a treble clef and beamed eighth-note, <a href="http://upload.wikimedia.org/wikipedia/commons/a/ac/Musical_notes.svg">in SVG, of course</a>, and tweaked it to my liking.</p>
<p>My tools? A Web browser with the audio API enabled (libre source), a search engine, and a text editor.</p>
<p>Voilà!  From knowing almost nothing about formal music (I&#8217;d never even heard the term &#8220;middle C&#8221; before), I created a simple synthesizer, and learned a bit about music along the way.  That&#8217;s the power of the open Web.  That&#8217;s why I&#8217;m so pumped up about this new focus on audio.  This one goes to 11.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/web-audio-goes-to-eleven/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Platform Games</title>
		<link>http://schepers.cc/platform-games</link>
		<comments>http://schepers.cc/platform-games#comments</comments>
		<pubDate>Tue, 09 Jun 2009 16:07:12 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CDF]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=133</guid>
		<description><![CDATA[<br/>I attended Google I/O a couple weeks ago, and had a great time.  They really put the &#8220;hype&#8221; in HyperText Markup Language 5, identifying things like the Geolocation API and some of the WebApps Working Group deliverables as part of &#8220;HTML5&#8243;.  Not quite accurate, but it was a branding exercise, not a technical one.  Notably [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I attended Google I/O a couple weeks ago, and had a great time.  They really put the &#8220;hype&#8221; in HyperText Markup Language 5, identifying things like the Geolocation API and some of the WebApps Working Group deliverables as part of &#8220;HTML5&#8243;.  Not quite accurate, but it was a branding exercise, not a technical one.  Notably absent from the things they rolled into HTML5 during the keynote, though, was SVG&#8230; in fact, they seemed to go out of their way to avoid it.</p>
<p>But it&#8217;s in there.<span id="more-133"></span></p>
<p>Behind the curtains, I talked to several Googlers at the conference committed to SVG.  Brad Neuberg, a whipsmart Google engineer and all-around swell guy, is making a Javascript shim that takes SVG (referenced or inline) and renders it consistently across browsers, including Internet Explorer, using the Flash plugin.  Patrick Chanezon and Ignacio Blanco, also of Google, spoke about <a title="Google Slides on SVG and Canvas at JavaOne" href="http://www.slideshare.net/chanezon/javaone-2009-2d-vector-graphics-in-the-browser-with-canvas-and-svg" target="_blank">SVG and Canvas at JavaOne</a> the week after.</p>
<p>It wasn&#8217;t a certainty that SVG integration would make it into HTML5 (rather than HTML6, etc.).  I&#8217;d been asking for it to be included for a while, but the the editor, Ian Hickson, was resistant to the idea.  At one point, he even <a title="Ian Hickson on Alternate Vector Graphics Formats for HTML" href="http://lists.w3.org/Archives/Public/public-html/2008Mar/0039.html" target="_blank">suggested</a> supporting some other vector graphics language, even a stripped-down custom format (which was likely a testing of the waters&#8230; in a similar vein, rather than simply integrating custom namespaces or RDFa or ITS, he reinvented his own syntax for each instead).  But ultimately, even he knew that wouldn&#8217;t fly for vector graphics.  SVG is already too well supported in browsers, in authoring tools, and as a general format for anything else to make sense.</p>
<p>Because it&#8217;s all about the platform.  And SVG is part of the platform.</p>
<p>Already, inline SVG (that is, SVG mixed into a single document with XHTML) works in all the browsers that support both XHTML and SVG (that is, all but Internet Explorer), and even worked in <a title="Old example of Inline SVG" href="http://www.schepers.cc/inlinesvg.html" target="_blank">plain-text HTML in Internet Explorer</a> with the Adobe plug-in almost a decade ago.  Steven Pemberton <a title="Steven Pemberton on XHTML, via Molly Holzschlag" href="http://www.molly.com/2009/06/02/the-real-why-xhtml-discussion/" target="_blank">points out</a> that that was the true innovation of XHTML, the ability to plug in new syntaxes and new functionality without having to change the core of the language or revisit parsing rules.  It has been argued that XHTML&#8217;s extensibility is superior to HTML5&#8242;s parsing rules that only work with a set vocabulary.</p>
<p>But the browser vendors were determined that text/html, being more common and robust than XHTML, had a market advantage, and so to fit in with that, SVG needed to work not just with XHTML, but also with text/html.  There were compromises along the way with SVG&#8230; probably chief among these are parsing issues.  Unlike XHTML, SVG was designed from the ground up for an XML syntax.  HTML uses a much more complicated parsing that defines error recovery behavior for things like missing quotes around the attribute values, case insensitivity, and non-well-formed markup, and it doesn&#8217;t support namespaces properly.  SVG in text/html has to (some say &#8220;gets to&#8221;) follow some of these rules in order to fit in.  The SVG WG was a bit reluctant to adopt these changes, out of concern that SVG might fly into tag soup, making it harder for existing authoring tools and XML-based SVG viewers, as well as generic XML processing tools.</p>
<p>But ultimately, we had to agree that SVG needs to conform to the platform.</p>
<p>So, we&#8217;ve taken a step backwards in some ways: right now, there&#8217;s pretty much no non-conforming SVG content in the wild, and the Adobe SVG viewer was fast, and had features still not found in some browsers.  But we&#8217;ve now got better error recovery, and SVG in almost all major browsers, which is more robust than a single-vendor plug-in, and is ultimately better for authors and users.  The way to use it with HTML is now better defined:</p>
<ul>
<li>as with HTML, for SVG in text/html, you don&#8217;t have to use quotes on your attribute values (if the value doesn&#8217;t contain spaces, etc.)</li>
<li>authors don&#8217;t need to declare namespaces (in fact, this was the case with the Adobe SVG Viewer already, so not really much of a loss)</li>
<li>mistakes in casing for element and attribute names will be corrected</li>
<li>well-formedness errors will be recovered as best as possible, rather than halting rendering</li>
<li>custom namespaces, such as round-tripping metadata inserted by authoring tools, will not be supported</li>
<li>most importantly, normal valid, well-formed SVG with no custom namespaces will Just Work, whether as a standalone document or referenced as an external file, or inline in text/html or XHTML.</li>
</ul>
<p>In fact, though HTML5 is not yet done, SVG inline in text/html already works in special experimental builds of Firefox and Opera, and should work out of the box soon.  Forward-looking authors can already use SVG in modern browsers, using XHTML, and that content will soon work when served as text/html as well. The final barrier to common use of SVG is being solved by Brad&#8217;s &#8220;SVG Web&#8221; shim, allowing SVG content to work in IE.  This will not be a perfect solution; it would be better if IE supported SVG natively without making developers jump through hoops, but that won&#8217;t happen for at least a couple years (if at all), and SVG Web at the very least will bridge the gap.  I&#8217;ve seen it run, and it&#8217;s pretty impressive already.</p>
<p>That SVG has had to bend in the wind gives the SVG language a unique opportunity to innovate.  If the syntax is already going to need an update in existing browsers and authoring tools, we can reexamine some old assumptions and past missteps, and extend SVG to be better integrated with HTML and CSS and existing scripting practices.  And even more importantly, we can examine use cases and make SVG better suited for what authors need to do.</p>
<p>Why is HTML5 a powerful enough platform that Google throws it&#8217;s weight behind it, despite the inaccurate and ungainly name?  Is it the error-correcting parsing?  No, that&#8217;s a good feature, even if the need for it is unfortunate, but it&#8217;s unclear that this is better than XHTML.  Is it the new features like the &lt;video&gt; and &lt;audio&gt; elements, which allow it to compete with the most common use of Flash?  No, that capability has been possible using XHTML and SMIL for years, and is even part of SVG Tiny 1.2 (N.B.: HTML&#8217;s script interfaces are simpler and better than SMIL&#8217;s, but its lack of synchronization or timing containers is a big step back).  Is it the new WebApp-centric user interface focus?  No, we would probably be better served by a language designed for making UIs (like XUL).</p>
<p>So, what is the true power of HTML5?  Coordination.  Getting all the browser vendors to standardize on a common set of features.  HTML5 is not a technical achievement, it&#8217;s a social movement.  It&#8217;s an instantiation of the Open Web in the form of several specifications across several groups, and implemented fairly uniformly across all major browsers and platforms.  This is largely in response to user demands to the browser vendors.  They are tired of the special-casing and workarounds that make their lives and jobs harder and less satisfying, that make users struggle&#8230; they want a consistent platform, one without script libraries or shims or plug-ins or arcane rules.  And the browsers realize this, and know that a rising tide raises all ships.</p>
<p>My personal advice to vendors who have excellent authoring tools, but who want to also control the runtime environment?  The Web has moved on from vendor lock-in and black-box plug-ins.  In a world where there is coordination between multiple vendors to deliver and support a central set of technologies, where everyone is unifying on a standard Open Web platform, from Apple to Google to Mozilla to Nokia to Palm to Opera to Vodafone.  Nobody wants the hassle of being the only one to maintain the platform, but they all want the ability to change it without going though the gatekeeper of a single vendor.</p>
<p>It&#8217;s all platform games, and if you want to play, you have to jump to the next platform.  Google knows this&#8230; they are hosting the next SVG Open, and are aggressively pushing the whole platform.  Looks like a fun year ahead!</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/platform-games/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CSS Link Hack in SVG</title>
		<link>http://schepers.cc/css-link-hack-in-svg</link>
		<comments>http://schepers.cc/css-link-hack-in-svg#comments</comments>
		<pubDate>Mon, 19 Jan 2009 04:09:15 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CDF]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[SVG Basics]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=80</guid>
		<description><![CDATA[<br/>While answering a question about styling SVG with CSS in the Freenode #svg IRC channel (yes, people still use IRC), I threw together a simple example to illustrate.  I like to do this, since in keeps me in practice, and gives me a chance to check the state of current implementations in the fast-changing world [...]]]></description>
			<content:encoded><![CDATA[<br/><p>While answering a question about styling SVG with CSS in the Freenode #svg IRC channel (yes, people still use IRC), I threw together a simple example to illustrate.  I like to do this, since in keeps me in practice, and gives me a chance to check the state of current implementations in the fast-changing world of SVG browser support.</p>
<p>The question was how to use CSS stylesheets, both internal and external, with SVG in <a title="Inkscape, a free open-source art editor" href="http://www.google.com/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Fwww.inkscape.org%2F&amp;ei=j99zScyjJ9G3twfL_7HpCA&amp;usg=AFQjCNE70ocRGcdCMwJsOZQ7zgFNw5HGTg&amp;sig2=sAOaMiBuMIHMSyZPUHVRdQ" target="_blank">Inkscape</a>.  While I know that Inkscape makes heavy use of CSS inline style declarations on elements (more than is to my personal taste, to be honest), I didn&#8217;t (and don&#8217;t) know if it has any UI features for adding internal stylesheet blocks, or links to external stylesheets.  So I made a little test&#8230;</p>
<p><a title="SVG example of styling" href="http://www.schepers.cc/svg/style/svgstyle.svg" target="_blank">svgstyle.svg</a></p>
<pre>&lt;?xml-stylesheet type="text/css" href="svgstyle.css" ?&gt;
&lt;svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     width="100%" height="100%" viewBox="40 0 145 70"&gt;

  &lt;style type="text/css"&gt;&lt;![CDATA[
     ellipse
     {
       fill: lime;
       stroke: green;
       stroke-width: 10px;
     }
  ]]&gt;&lt;/style&gt;

  &lt;rect id="inline" x="50" y="10" width="30" height="50"
        rx="5" ry="5"
        style="fill:lime; stroke:green; stroke-width:3px;"/&gt;
  &lt;ellipse id="internal" cx="103" cy="35" rx="15" ry="25"
        style="stroke-width:3px;"/&gt;
  &lt;circle id="external" cx="150" cy="35" r="25"
        style="stroke-width:3px;"/&gt;
&lt;/svg&gt;</pre>
<p><a title="CSS Stylesheet for SVG" href="http://www.schepers.cc/svg/style/svgstyle.css" target="_blank">svgstyle.css</a></p>
<pre>circle
{
   fill: lime;
   stroke: green;
   stroke-width: 10px;
}</pre>
<p>Which looks like this (at least, in Firefox, Opera, Safari, and presumably Chrome):</p>
<p><iframe src="http://www.schepers.cc/svg/style/svgstyle.svg" class="aligncenter" frameborder="0" width="290" height="140" scrolling="no">Please use FF1.5+, Opera 9+, WebKit/Safari3.0, or IE with an SVG plugin!</iframe></p>
<p>Both internal styles worked fine in Inkscape, but the external reference did not, showing just a black circle.  I&#8217;m not really surprised.  Note the clunky way that you have to link to external stylesheets in SVG:</p>
<pre>&lt;?xml-stylesheet type="text/css" href="svgstyle.css" ?&gt;</pre>
<p>That&#8217;s really XSLT-licious.  I have to confess, I don&#8217;t really care for <acronym title="Processing Instruction">PI</acronym>s (insert dated Magnum PI joke here), or XML prologs in general&#8230; they seem somehow clumsy and un-XMLy, like a throwback to SGML.  And as far as I know, they can&#8217;t be created or changed dynamically via clientside script.  Compare that to the relatively easy and straightforward X/HTML way of linking to external stylesheets:</p>
<pre>&lt;link href="svgstyle.css" rel="stylesheet" type="text/css"/&gt;</pre>
<p>In the SVG WG, we intend to allow authors to reference external stylesheets in a manner a little more modern and consistent with what authors are already used to using, in some upcoming spec.  We could do that a couple of different ways.  We could allow them to use an <code>xlink:href</code> attribute on the <code>&lt;style&gt;</code> element, in the same way we currently treat the <code>&lt;script&gt;</code> element (that is, if there&#8217;s a resolvable external link, we use that, otherwise we use the child content of the element), or we could add a <code>&lt;link&gt;</code> element like X/HTML, or both.  I kinda like the idea of allowing either.</p>
<p>To that end, I made a <a title="Link to CSS Stylesheet in SVG" href="http://www.schepers.cc/svg/style/external-link.svg" target="_blank">couple</a> of <a title="Style reference to CSS Stylesheet in SVG" href="http://www.schepers.cc/svg/style/external-style.svg" target="_blank">tests</a>, just playing around, to see if any browsers accidentally supported either of those options, by merit of having some shared codebase with X/HTML in their implementations.  Unsurprisingly, neither worked.</p>
<p>But then I had another idea&#8230; use the an <code>&lt;xhtml:link&gt;</code> element in the XHTML namespace&#8230;</p>
<pre>&lt;xhtml:link href="svgstyle.css" rel="stylesheet" type="text/css"/&gt;</pre>
<p>With this rather happy result, which works in at least Firefox, Opera, and Safari.<br />
<a title="XHTML link to CSS Stylesheet in SVG" href="http://www.schepers.cc/svg/style/external-link-xhtml.svg" target="_blank">external-link-xhtml.svg</a>:</p>
<p><iframe src="http://www.schepers.cc/svg/style/external-link-xhtml.svg" class="aligncenter" frameborder="0" width="150" height="150" scrolling="no">Please use FF1.5+, Opera 9+, WebKit/Safari3.0, or IE with an SVG plugin!</iframe></p>
<p>I don&#8217;t know if this is by design, or if it just fell out of the model, but I have to say I&#8217;m pleased as punch that it works.  If nothing else, it&#8217;s a great proof of concept for adding more ways of linking to CSS in the SVG spec.  This one goes in my toolkit, and I&#8217;m going to try to ensure that it gets standardized, if it&#8217;s not already there in some corner of some other spec.  Probably somebody already knows about this (hell, probably everybody does, and I&#8217;m late to the party), but for me it was a w00ty discovery.</p>
<p><strong>Update:</strong> <a href="http://mcc.id.au/">heycam</a> speculated that you might also be able to use <code>@import</code> rules, and <a title="Importing external CSS Stylesheet in SVG" href="http://www.schepers.cc/svg/style/external-import.svg" target="_blank">indeed you can</a>:</p>
<pre>&lt;style type="text/css"&gt;@import url(svgstyle.css);&lt;/style&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/css-link-hack-in-svg/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two Tech Predictions for the New Year (or So)</title>
		<link>http://schepers.cc/two-tech-predictions-for-the-new-year-or-so</link>
		<comments>http://schepers.cc/two-tech-predictions-for-the-new-year-or-so#comments</comments>
		<pubDate>Mon, 07 Jan 2008 18:50:41 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CDF]]></category>

		<guid isPermaLink="false">http://www.schepers.cc/?p=50</guid>
		<description><![CDATA[<br/>Okay, first a disclaimer: none of this speculation comes from &#8220;insider information&#8221; I&#8217;ve gotten as an employee of W3C; but being surrounded by the swirl of standards, I suspect I may have picked up on a zeitgeist. I&#8217;m interested in seeing how well my predictions play out. Prediction 1: Microsoft will merge its browser and [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Okay, first a disclaimer: none of this speculation comes from &#8220;insider information&#8221; I&#8217;ve gotten as an employee of W3C; but being surrounded by the swirl of standards, I suspect I may have picked up on a zeitgeist.  I&#8217;m interested in seeing how well my predictions play out.</p>
<p><strong>Prediction 1: Microsoft will merge its browser and office platforms </strong></p>
<p>That&#8217;s what I would do if I were them.  Right now they are in a bit of mindshare competition with online apps, like Google Docs; as Web apps transition to the desktop (like, the downloadable desktop GMail client), Microsoft will take their core competencies (the desktop Office suite) and make it more Web-friendly.  They&#8217;ll take advantage of the fact that desktop apps are often more robust and speedier, and tie in the  chief benefits of Web apps: distributed authoring, ease of deployment, and ubiquitous availability.  To enable the latter, they also make a Office-lite Web app, sold as &#8220;software as a service&#8221;, for those who&#8217;ve bought the real product (though of course it won&#8217;t be as good as their desktop version); they might open this up in the razor-and-blade sales model.</p>
<p>They will merge two of their products, SharePoint Server and Exchange Server, into a sort of portal/wiki thing that ties into their new Office Browser.  They will probably integrate chat (MSN, or whatever) into the whole thing, so you have some uber-communications suite: email, chat, collaborative distributed document creation, and all that enthralling office goodness.</p>
<p>This could be IE8 (or IE9), or a totally new product, but it will probably be a new version of MS Office.  It will be their typical monolithic entry into the agile Web space.  And of course, it will use OOXML as a native format.</p>
<p><em>Why I&#8217;m wrong:</em> I think this would be smart, but the different divisions of Microsoft actually compete for resources.  I wonder if they could play nicely together for long enough.</p>
<p><em>Update (25-01-2008):</em> I&#8217;m actually going to Microsoft next week to talk about standards stuff.  Maybe I <em>will</em> get an inside scoop.</p>
<p><strong>Prediction 2: A cross-platform browser based on WebKit (but not Safari) will supplant Firefox</strong></p>
<p>WebKit has a cleaner, faster (if less complete) engine than Mozilla, and it&#8217;s already been reused by Apple for Safari, Nokia for their mobiles, Adobe for Apollo (I think), and by Google for Android.   But all those are controlled, as far as I can tell, by their name-brand deployers.</p>
<p>I think a new, more open repackaging will happen.   It will be standards-based, and truly open-source, from the engine on up to the executable.  It will implement Widgets (as being specified at W3C), so that people can make simple desktop applications based on common Web technologies.  But the key enhancement will be a new, cleaner, lessons-learned, easier-to-author Extensions platform.   Extensions, in my mind, are the most brilliant thing about Firefox, allowing slightly-above-average users to create new features for the browser, or to use features added by others; this gives great community buy-in.  But it will be even easier to do in this new browser; this will probably necessitate a new XUL-like language, too, so people can add chrome, or it might just be in the form of script APIs.   But what would be even smarter is to have the Extension editor, and Widget editor, built right into the browser, so making a new theme or feature or widget is as point-and-click as possible, with common tasks encapsulated (though for advanced enhancements, some scripting will be needed, in a smart editor with code completion).</p>
<p>Oh, and it will have SVG support.</p>
<p>Naturally.</p>
<p><em>Why I&#8217;m wrong:</em> This is just my dream browser.  Browsers are a hard market to break into, because there&#8217;s established competition, and you&#8217;re not making a product you can sell&#8230; you have to give it away.  There&#8217;s already a lot of momentum around other efforts.  But this is the browser I want.  Too bad I&#8217;m so lazy.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/two-tech-predictions-for-the-new-year-or-so/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Underscoring Accessibility</title>
		<link>http://schepers.cc/underscoring-accessibility</link>
		<comments>http://schepers.cc/underscoring-accessibility#comments</comments>
		<pubDate>Wed, 17 Oct 2007 21:57:54 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CDF]]></category>
		<category><![CDATA[Metadata]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.schepers.cc/?p=46</guid>
		<description><![CDATA[<br/>Dramatis Personae Doug Schepers (a Montague) Anne van Kestern (a Capulet) Simon Pieters (a Capulet) Henri Sivonen (a Capulet) Rich Schwerdtfeger (a Franciscan) Aaron Leventhal (an Apothecary) The Prologue Over the past few weeks, there has been a long, drawn-out discussion about how to integrate ARIA (an accessibility specification) into both SVG and HTML in [...]]]></description>
			<content:encoded><![CDATA[<br/><h3>Dramatis Personae</h3>
<ul>
<li>Doug Schepers (a Montague)</li>
<li>Anne van Kestern (a Capulet)</li>
<li>Simon Pieters (a Capulet)</li>
<li>Henri Sivonen (a Capulet)</li>
<li>Rich Schwerdtfeger (a Franciscan)</li>
<li>Aaron Leventhal (an Apothecary)</li>
</ul>
<h3>The Prologue</h3>
<p>Over the past few weeks, there has been a long, drawn-out discussion about how to integrate <a target="_blank" title="Roles for Accessible Rich Internet Applications" href="http://www.w3.org/TR/aria-role/">ARIA</a> (an accessibility specification) into both SVG and HTML in a uniform way.  There have been two main camps, as there usually are in these matters: the XML advocates, and the HTML5 (WHATWG) advocates.  Both sides want to make sure that all content works the same across all browsers, authoring tools, etc. (collectively called User Agents), but they differed in how they thought it should be done.</p>
<p>The XML True Believers have held that the way forward for the Web is to enforce a strict, well-defined syntax for Web languages, and that to extend or combine languages, a differentiating mechanism called &#8220;namespaces&#8221; would be used.  Namespaces in XML are specified to take the form &#8220;schepers:doug&#8221;.  They declared a do-over on HTML, recasting it in the new XML mold (XHTML), and planned for browsers to be stricter on new content, and for authors to have learned their lessons.</p>
<p>The HTML Young Turks came forward with the observation that no matter how well you define a syntax, people will make mistakes (or not know the right way to do things), and that the way to recover from those mistakes is to define error-handling behavior for each kind of mistake; they also believed that since they could now reconcile older &#8220;broken&#8221; content with new browser behavior, that they were constrained to define behavior that would work in all past browsers, as much as possible, and to degrade gracefully in those that didn&#8217;t.  But this required a more rigid parsing mechanism that doesn&#8217;t work well with extensibility, a problem exacerbated by Internet Explorer&#8217;s idiosyncratic and variable (one might even say spasmotic) behavior regarding the colon (&#8220;:&#8221;), meaning XML Namespaces didn&#8217;t work right.  Also, the colon has a special meaning in CSS, yet another wrinkle.</p>
<p>So, XHTML and SVG are based on the XML model, and the new HTML5 is based on the new-old model.  This difference wasn&#8217;t really much of a problem for SVG, though, because SVG and HTML are two different languages&#8230;</p>
<p>But of course people want to use them together.  (More on that in some other post.)</p>
<p>The obvious way around that is to have two different parsers (a parser is a program that reads a formal syntax and makes a model of it for the browser to act on), and when you encountered SVG inside HTML, you would switch to the stricter parser.  HTML would have its model for naming attributes (with no colon), and SVG would have its attributes (with a colon).</p>
<p>But there&#8217;s a hitch.  ARIA is an accessibility technology meant to work in HTML and XHTML and SVG (and other presentation languages).  The functionality for ARIA is defined in its own specification, but it&#8217;s not intended to be used on its own&#8230; it has to be integrated into a host language.  It would be confusing for authors to have to use two different syntaces for the same functionality in different languages.</p>
<p>For example, in SVG you might have:</p>
<pre>&lt;svg version="1.1"
xmlns="<a class="linkification-ext" title="Linkification: http://www.w3.org/2000/svg" href="http://www.w3.org/2000/svg">http://www.w3.org/2000/svg</a>"
xmlns:xlink="<a class="linkification-ext" title="Linkification: http://www.w3.org/1999/xlink" href="http://www.w3.org/1999/xlink">http://www.w3.org/1999/xlink</a>"
xmlns:xhtml="<a class="linkification-ext" title="Linkification: http://www.w3.org/1999/xhtml" href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>"
xmlns:aaa="<a class="linkification-ext" title="Linkification: http://www.w3.org/2005/07/aaa" href="http://www.w3.org/2005/07/aaa">http://www.w3.org/2005/07/aaa</a>"&gt;

&lt;g xhtml:role="checkbox" aaa:checked="true"&gt;
&lt;rect x="5" y="5" width="20" height="20" rx="5" ry="5"
fill="none" stroke="crimson" stroke-width="2"/&gt;

&lt;text x="30" y="22" font-size="18" fill="crimson"&gt;
Enable Accessibility&lt;/text&gt;
&lt;/g&gt;

&lt;/svg&gt;</pre>
<p>While in HTML, you would have something like:</p>
<pre>&lt;html&gt;
&lt;ul role="checkbox" aria-checked="true"&gt;
&lt;li&gt;Enable Accessibility
&lt;/ul&gt;
&lt;/html&gt;</pre>
<p>Let the drama unfold&#8230;</p>
<p><span id="more-46"></span></p>
<h3>Act I</h3>
<h4>Scene I</h4>
<p>XHTML defined a new point of extensibility, the <a title="XHTML Role Attribute Module" target="_blank" href="http://www.w3.org/TR/xhtml-role/">&#8216;role&#8217; attribute</a>, which was intended to be use to add semantics to an element.</p>
<h4>Scene II</h4>
<p>The WAI Working Group  decided to use that as the point of entry for adding accessibility behaviors to custom controls.  Custom controls are things like an interactive tree selector, or a slider knob; they extend the limited set of form-based controls that browsers settled on, and they are increasingly used in script libraries like dojo or Scriptaculous.  SVG developers have been making custom controls using script and/or declarative animation for many years, since SVG doesn&#8217;t have any native controls at all, but can be used to build visually glitzy ones; they just aren&#8217;t treated as controls by AT (Assistive Technology) apps.  ARIA can be used to tell the AT that a collection of elements is meant to represent a particular type of control, and report what its current state is (on, off, hidden, selected, etc.).  So the SVG WG has been eyeing the progress of the Role and ARIA specs.</p>
<h3>Act II</h3>
<h4>Scene I</h4>
<p>The HTML5 movement, under the banner of the WHATWG, gained critical mass and was brought into the W3C for standardization with all major browser vendors.  The ARIA proponents worked hard to get ARIA&#8217;s accessibility functionality integrated into the standard.  Simon Pieters of Opera and Aaron Leventhal of Mozilla made a <a target="_blank" title="ARIA Proposal for HTML5" href="http://simon.html5.org/specs/aria-proposal">proposal for integration of ARIA</a> using a limited &#8216;role&#8217; attribute.  Because XML Namespaces don&#8217;t work right in IE (and not very intuitively in CSS), it was proposed that the different states of ARIA would be referenced and set in HTML5 using the prefix &#8216;arai-*&#8217; instead of &#8216;aaa:*&#8217; or &#8216;aria:*&#8217;.  I was only vaguely aware of early discussions of &#8216;role&#8217; in HTML5, and despaired of its ever being adopted, knowing the resistance to generic extensibility.  But Simon and Aaron were actively working on getting ARIA integrated into the next releases of Opera and Firefox, to enable accessible Web apps.</p>
<h4>Scene II</h4>
<p>Dave Raggett (who originated forms in HTML) made an independent public request for the &#8216;role&#8217; attribute to be added to SVG; I jumped on this, expecting that it would be done using the built-in extensibility mechanism provided by XML Namespaces.  Much to my dismay, immediately was made aware of Simon and Aaron&#8217;s proposal, which uses different syntax to how it would be done in SVG.  <a target="_blank" title="Role/ARIA email thread 1" href="http://lists.w3.org/Archives/Public/www-svg/2007Oct/0012.html">Much</a> <a target="_blank" title="Role/ARIA email thread 2" href="http://lists.w3.org/Archives/Public/www-svg/2007Oct/0025.html">email</a> <a target="_blank" title="Role/ARIA email thread 3" href="http://lists.w3.org/Archives/Public/www-svg/2007Oct/0046.html">discussion</a> ensued, and a little biting of thumbs.</p>
<h4>Scene III</h4>
<p>I talked with the SVG Working Group about the &#8216;role&#8217; attribute (step one in integrating ARIA), and while there were some reservations, we agreed that it would be great if we could do it.  (Note: really boring issues of process elided here&#8230; assume I explained why it&#8217;s kinda bad timing for SVG right now.)  But we decided to first gather opinions about how best to do so from the SVG community and other interested parties.  But the issue of &#8216;role&#8217; was buried under the talk of whether or not to use the controversial and dreaded Namespaces (e.g. &#8216;aria:checked&#8217; versus &#8216;aria-checked&#8217;).  It&#8217;s undesirable to add arbitrary attributes to SVG, because the content wouldn&#8217;t validate and couldn&#8217;t take advantage of all the XML tools that already exist.  And there are like 70 attributes, so we couldn&#8217;t just adopt them all&#8230; and if we did, what would happen when ARIA v2.0 came out?  Ugh&#8230; messy.  But the HTML5 guys insisted they couldn&#8217;t use namespaces.</p>
<h3>Act III</h3>
<h4>Scene I</h4>
<p>Rich Schwerdtfeger of IBM, who&#8217;s heavily invested in getting ARIA implemented, set up an informal call involving the Dramatis Personae (and a few others who couldn&#8217;t show up).  I talked it over with people on &#8220;my&#8221; side, and reviewed the XML Namespaces specification.  A little reflection revealed to me that, in fact, both approaches were using namespaces&#8230; just the syntax is different (&#8216;aria:*&#8217; versus &#8216;aria-*&#8217;).  And while the Namespaces spec doesn&#8217;t describe any other mechanism than the namespace declaration and prefix, neither does it procribe it.  I saw a possible way out.</p>
<p>The uninformed reader will assume this is some persnickety, trivial detail; such a reader would be right, but it&#8217;s still a pain to coordinate on crap like this.  Everyone assumes they are right, the other guy is wrong, and everyone should just do it their way.</p>
<h4>Scene II</h4>
<p>The <a target="_blank" title="Scribed minutes of informal talk on ARIA in HTML and SVG" href="http://www.w3.org/2007/10/17-aria-minutes.html">teleconference happened today</a>, and arguments were presented, and assumptions were challenged, and a verbal duel took place.  Issues with delimiters in IE and CSS were explained and explored.  The colon was a real problem, but so was the dash.  Making the &#8220;aria-*&#8221; string is a klutzy, short-term, one-off solution, and couldn&#8217;t really cut it as a true namespace prefix.  SVG has many attributes that contain the dash (&#8216;stroke-width&#8217;, &#8216;fill-rule&#8217;, &#8216;font-size&#8217;, &#8216;stroke-dasharray&#8217;, &#8216;fill-opacity&#8217;, &#8216;pointer-events&#8217;, &#8216;font-family&#8217;, &#8216;shape-rendering&#8217;, and many more); it&#8217;s a common convention to separate words in attributes with a dash.  No future (or present) language could safely use &#8216;font-&#8217; or &#8216;shape-&#8217; or any other prefix to integrate with SVG.</p>
<p>But Aaron Leventhal, a very pragmatic guy, pulled out just the medicine I think was needed.  The underscore (&#8220;_&#8221;).  It works in IE, has no special meaning in CSS, is a legal (if underused) character for attributes in XML, doesn&#8217;t cause problems for the HTML parser, and doesn&#8217;t conflict with any conventions in SVG.  It&#8217;s probably underutilized because it&#8217;s just slightly harder to type than a dash (on my keyboard, it&#8217;s the same key, but requires the shift key be depressed).</p>
<p>_!!</p>
<h4>Scene III</h4>
<p>The final scene has been lost in the mists of the future.  But here&#8217;s my plan, if nothing gets in its way:  to create a new namespacing specification that uses the underscore as its prefix delimiter.  It would differ from <a target="_blank" title="Namespaces in XML 1.0 (Second Edition)" href="http://www.w3.org/TR/xml-names/">Namespaces in XML 1.0</a> in three ways:</p>
<ol>
<li>It would make the namespace prefix string fixed.  In XML Namespaces 1.0, any string is allowed to be used for any namespace prefix.  For example, if you were feeling particularly contrary, you could delare that the string &#8220;svg&#8221; is the prefix for XForms content, &#8220;xforms&#8221; is the prefix for MathML content, and &#8220;math&#8221; is the prefix for SVG content; in reality, nobody does this, for obvious reasons.  In my proposal, there would be a central &#8220;registry&#8221; of sorts for the most common prefixes; my suggestion is that such a registry should be defined in the CDF WICD profiles (though I haven&#8217;t consulted that group), and that a User Agent that supports multi-namespace documents (aka Compound Documents) would know what those prefixes stand for.  The most obvious ones are &#8220;svg&#8221;, &#8220;html&#8221;, &#8220;xhtml&#8221;, &#8220;xforms&#8221;, &#8220;mathml&#8221;&#8230; oh, yeah, and &#8220;aria&#8221;.  That this is less inherently extensible than the colon-delimited unfixed prefix might even be a bonus, ensuring that the combination of technologies has been combined systematically and specified, promoting interoperability betweem UAs.  Prefix names would consist only of letters and digits, forgoing the dot and the dash, and of course the colon and underscore; a possible exception that occurs to me is the use of the dot to serve as a versioning convention, so you would have &#8220;aria.2_checked&#8221; to represent an ARIA v2.0 &#8216;checked&#8217; attribute.</li>
<li>As a consequence of #1, there would be no declaration needed or specified.  The supporting UA would simply know the &#8221; name + _&#8221; prefix, and treat it as it should be treated.  This makes copy-paste authoring easier, since authors wouldn&#8217;t have to know or care about the namespace declaration earlier in the scope of the copied content.</li>
<li>This specification would not reserve the underscore, but merely allow supporting implementations to assign special meaning to the combination of &#8221; name + _&#8221;.  This would prevent some problems in existing XML processors.  Languages that register their prefix name would be encouraged to pick something that is unlikely to conflict with other partial attribute or element names.  (I toyed with the idea of making this an extension mechanism for attributes only&#8230; not element names.  I haven&#8217;t thought that through yet, though.)</li>
</ol>
<p>This would be more intuitive for creatinging documents, since authors (and authoring tool) could depend upon a convention.  Supporting XML processors would have a much easier time resolving namespaces.  Languages and UAs could support both namespacing schmemes, if they so chose, to allow for custom or unconventional namespaces that aren&#8217;t registered; the two schemes are orthogonal and (I believe) compatible.</p>
<p>Let the rotten tomatoes fly.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/underscoring-accessibility/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

