Blah blah

JavaScript onclick pop-ups: not Satanic, but still naughty.

Friday 9 July 2004

After my somewhat intemperate rant about the evils of JavaScript pop-ups, I talked to some experts about whether they are evil, after all. Received wisdom is that JavaScript shouldn’t be used because some screenreaders couldn’t understand it, or would read scripts as text rather than executing them. The same information is duplicated in many, many places – but exactly which screenreaders get confused? I couldn’t seem to find a list anywhere. So, I fired up Eudora and started emailing folks with bigger brains than mine.

The splendid Julie Howell, a tireless campaigner from the Royal
National Institute for the Blind wrote: "There is no ‘pop ups is bad’ thing – if anyone says there is, they need correcting. Sure, pop-ups can cause usability probs, but there is no ‘accessibility’ issue there necessarily."

Bob "The Bobster" Regan of Macromedia concurs that it’s largely a usability problem: "They ‘break’ the back button. If you are focused on a pop up – then the back button suddenly doesn’t work and you won’t know why. They are actually allowed, you just have to warn the user ‘opens in a new window’ … They can actually be good in certain cases. Imagine a complex Flash app used to simulate a chemical process. You may want to put that in a pop up to limit the other ‘noise’ around it. It’s like frames – not purely evil.".

Jim Thatcher suggests that JavaScript pop-ups and navigation that can be operated on the keyboard are all fine: "The key is, can you conveniently handle the navigation with the keyboard? If YOU can do it then JavaScript is no problem.

Mike has written to the U.S. screenreader manufacturers and asked them about their JavaScript support, and will report back.

I agree with Rachel Andrew of the Web Standards Project that, although JavaScript is available to Screenreaders (unless Mike reports back otherwise), there are so many associated usability problems with pop-ups of any sort, they’re best avoided. And although no-one seriously uses the Lynx browser any more, devices like PDAs, cellphones and my soon-to-be-patented internet-enabled sextoy® have no JavaScript support, and so can’t cope with JavaScript pop-ups at all. (Although no-one would seriously want a sextoy that pop-ups, would they?)

Rachel says: "I think it’s a bigger picture thing. A well implemented screen reader is probably going to cope with JavaScript because its users will demand it – that doesn’t mean that using javascript when there is an alternative is right, as there will be many other users who find a new window confusing or problematic – not just the visually impaired. If you are navigating with the keyboard, a new window appearing can be problematic. If you use a device that has no concept of multiple screens, you have lost the opening window, as focus goes to the new one – and the popup window may assume you stil have the parent so ofers no way back. If you don’t have javascript then you don’t get the window at all."

So while I was probably over-reacting by saing that JavaScript pop-ups are the tool of the Devil, I think we can still say that they’re considered harmful.

I’ve also had a couple more mistakes pointed out by Jooly: "’DDA compliance’ and ‘web accessibility’ aren’t interchangeable terms. A site can be WAI complaint and still in breach of the DDA, ya know… all comes down to the definition of ‘service’ and how the ‘service’ is administered.

Oh, and that bit about ‘we’re approaching the deadline for DDA’… that’s wrong. The deadline for web sites was 1 October 1999. Honestly, these misapprehensions are keeping me in this job far too long."

15/7/04, Jim Thatcher told me:" The WCAG checkpoint on this issue says your web page should work just fine with scripting turned off. This covers mouseover color changes. There is nothing the screen reader does with these. But another common use of JavaScript is writing HTML; this is done as the page loads, and the screen reader doesn’t care – it just sees the html. These cover much use of JavaScript and it doesn’t depend on screen reader version – the fact that screen readers have no trouble. I can’t think of a single situation where "JavaScript support" depended on version."

A mail to Freedom Scientific elicited a similar response, althougn my request for a list of back versions of Jaws that support JavaScript-spawned pop-ups and onsubmit forms is unanswered.

4 Responses to “
JavaScript onclick pop-ups: not Satanic, but still naughty. ”

Pop-ups has always been my concern whenever I’m doing some important things with my PC. It doesn’t threaten the security of my system at all but it takes a lot of my precious time. It surely is a pain.

What’s most annoying about pop-ups is when you are in a hurry, you turn off your PC, go out of your house, you realized you forgo something from the computer, you switch it on and the pop-ups go out like they are also in a hurry, they hate wasting time and before you realize you are already waiting for all of them to load up like they own the computer! LOL…. Usually occurs eh?!

I work for Opera, but all opinions contained herein are mine (and are thus incontrovertibly
correct) and do not represent the opinions of my employers. (Comments are copyright their authors, not written by me, and
are therefore probably the ramblings of mad people.)