Making Pop-up Windows Accessible
mirror of
Accessible scripting index | tom.me.uk home
Ah, popups. Good old window.open. When abused, the most annoying thing ever - don't you just love those onunload popups? But they can sometimes be quite handy, when used appropriately.
The Problem
There are a few common ways to open a new window, and all involve wrongly using the A Element. The A element creates a hypertext link, primarily used to navigate between pages (they can also be used to send e-mails with mailto, and a few other things). But often developers incorrectly use them just to trigger script events, either using...
<a href="javascript:void(open('mypage.html', 'windowName', '...'));">Link text</a>
...or...
<a href="#" onclick="window.open('mypage.html', 'windowName', '...');">Link text</a>