Stopping Maintenance
Gary and I are stopping maintenance and support on various developer libraries we've created over the years. If anyone is actually using these libraries and wants take over their maintenance, please let one of us know:
- Audio Enriched Links
- PMIDI
- pyAA
- pyFMOD
- pyIFC
- pyOpenAL
- pyHook
- pySonic
- pySonicEx
The code and builds for these projects currently posted at http://sf.net/projects/uncassist and http://sf.net/projects/pysonic will remain in place, but we will no longer update them.
Two fellows have already contacted me about maintaining pyHook, but haven't set up shop yet. I'll provide a link to the new pyHook home page when they're ready.
We will continue maintaining pyTTS.
New Dojo WAI-ARIA tutorial
I posted a new tutorial about writing a rating widget using Dojo. The widget supports mouse and keyboard input, can be used with CSS turned off, reports its value and bounds via WAI-ARIA to assistive technologies, and has text that can be translated. Please let me know if you find any errors or want to suggest improvements.
Site Updates
I upgraded to WordPress 2.6.1 tonight. I also took the opportunity to install the GeSHi plugin. Hopefully everything is still working and my code snippets are more readable. Let me know if anything is amiss.
On a somewhat related note, the real Planet Accessibility site is now live. If you were reading or included in my stop-gap Accessibility Daily feed, make sure you go subscribe and register with Planet Accessibility.
Outfoxing Gmail with Greasemonkey
NOTE: The code in this post is out-of-date and does not work with recent versions of Outfox. See http://mindtrove.info/outfox-in-greasemonkey-revisited/ for a simpler, more compatible example. If you do update the GMail announcer code so it works with Outfox again, drop me a line and I'll link to your script.
Can you remember a time when the title of this blog post might have landed me in a straight jacket? Can you believe that was just a few short years ago? Yea, I can't either.
Anyway, Gary's post Outfox: speech, sound, and more for Firefox talks about a new Firefox extension. He's using it to create cross-platform, self-voicing Web apps for kids with disabilities using a pure JS API. He hopes to extend his work to support alternative input devices such as game pads and switches as the Outfox extension matures and grows more flexible.
One of the other potential uses listed on the Outfox homepage is Adding new I/O to web sites with Greasemonkey. Interesting. It's one thing to include Outfox explicitly in a page, but can it possibly work when injected by GM? What about for a complex app like Gmail with multiple iframes, dynamic changes, refreshing, etc.?
To learn about Outfox (and for fun), I decided to write a quick GM script for Gmail that announces the senders and times of new messages (bold items) in the inbox. (I would have done subject and summary too, but Outfox 0.1.0 appears to have some unicode issues and balked at some of the Gmail separator characters. Less is more at this point.) The script makes the announcement when the Gmail interface first loads, any time Gmail automatically refreshes its inbox view, or when the user clicks the refresh link to check for new mail. It is smart enough to announce a given message only once, however, so you don't hear the same message over and over again on each refresh.
Yes. It does actually work.
To try this script, make sure you have the Greasemonkey 0.8 and Outfox 0.1 extensions installed on Firefox 3. (Or use the latest available version of each.) Then visit the following link to have GM install the script: gmail_announcer.user.js.
For reference, the entire script is listed below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | // ==UserScript== // @name Gmail Announcer // @namespace http://www.mindtrove.info/ // @description Speaks new Gmail inbox messages using Outfox // @include https://mail.google.com/mail/* // @include http://mail.google.com/mail/* // @require http://outfox.googlecode.com/svn/trunk/js/outfox.js // ==/UserScript== var need_say = null; var ids = {}; function sayMessages(msgs) { if(!outfox.defaults.config) { // outfox really needs a better way to detect ready ... need_say = msgs; return false; } var header = 'New messages'; for(var id in msgs) { // say all messages var msg = msgs[id]; var segs = msg.split('»'); var sender = segs[0]; var time = segs[1].slice(segs[1].search('…')+2); if(header) { outfox.say(header); header = null; } outfox.say(sender + ' at ' + time); } return true; } function onOutfoxReady() { if(need_say) { // say anything already queued sayMessages(need_say); ids = need_say; need_say = null; } } function onTableChange(event) { var div = event.target; var trs = div.getElementsByTagName('tr'); var count = 0; var new_ids = {}; var curr_ids = {}; for(var i=0; i < trs.length; i++) { var tr = trs[i]; if(tr.innerHTML.search('<b>') != -1) { // marked as a new message if(ids[tr.id] == undefined) { // never announced new_ids[tr.id] = tr.textContent; ++count; } // curr is announced + new curr_ids[tr.id] = tr.textContent; } } // report if we can if(sayMessages(new_ids)) { ids = curr_ids; } } function onDocumentChange(event) { if(event.target.tagName == 'DIV') { var div = event.target; var tables = div.getElementsByTagName('table'); for(var i in tables) { var table = tables[i]; if(table.id != '' && !table.getAttribute('role')) { // watch just table changes from now on var div = table.parentNode.parentNode; div.addEventListener('DOMNodeInserted', onTableChange, false); document.removeEventListener('DOMNodeInserted', onDocumentChange, false); // start outfox var div = document.createElement('div'); document.body.appendChild(div); outfox.init(div, onOutfoxReady); // kick off initial read manually onTableChange({'target' : table.parentNode}); } } } } document.addEventListener('DOMNodeInserted', onDocumentChange, false); |
Accessibility Daily Moved
If you were tracking the Accessibility Daily feed I set up on Google Reader, you'll want to update your reader to point to the new feed aliased by http://a11y.mindtrove.info. I've switched over to using a clone of Eitan's Yahoo! Pipes aggregator to get more control over the output (and because I forgot the credentials for the Reader account! Doh!)
If you're interested, the raw URL is http://pipes.yahoo.com/pipes/pipe.run?_id=6280947538e79c29bdef3017f1f6846e&_render=rss.