Categories
accessibility learning rant xhtml

Getting around QOL (aka JavaScript execution in Safari)

QOL is Queen’s University Belfast’s student intranet system which allows centralised delivery of lecture content and course material to enrolled students. Unsurprisingly it doesn’t work properly in Safari as it relies heavily on (old school) JavaScript to build page content (not just modify its appearance in a delightfully DOM manner)

node_1 = node.addItem(new TreeNode('node_1','doc.gif','doc.gif','',false,true));
element = node_1.addElement(new elemHyperLink('Student Handbook-2007-08.doc','JavaScript:downloadResource(289314);','','','Student Handbook'));

element = node_1.addElement(new elemText('(92.50 KB)',''));
element = node_1.addElement(new elemImageLink('Download Times', '../images/clock.gif','',0,'top','JavaScript:showDownloadTimes(94720,289314)'));

Yuck. From the image below you can see the Lectures folder has been clicked to fold it out, but due to the JavaScript issue it does not.Queen's Online has some accessibility issues with javascriptYou can see there is an element: JavaScript:downloadResource(289314); in the code which is the type of link behind any given resource. I’ve never noticed this before, but if you extract that link from the page source (Cmd+Alt+U in Safari, Cmd+U in Firefox) and enter it into the Page Address bar, click enter, it will execute the JavaScript right there and download the file to your default location.