logo

More on Accessibility

Here's another little tip for creating accessible websites. Have you ever used JavaScript to open a popup window? Well, how does the user without JavaScript see this?!

The website I've been working on converting to Domino uses popups to display items in its gallery. To recreate this in Domino I've used a view and some JavaScript. But, I did it using a technique that makes it accessible to all users and to search engines. The link produced by the view looks something like this:

<a href="/db.nsf/view/docid/" target="_blank" onclick="window.open(this.href,'win','height=400,width=300');return false;">image</a>

The norm is for there to be a blank href and to simply have the target URL passed to the .open method. With this method, if you have JavaScript enabled, the onclick event takes care of everything. It opens the popup and tells the code to do nothing else (return false). The actual link itself is never followed. If you don't have JavaScript enabled or you are a search engine the onclick event won't trigger and you simply see the page in the current window.

The drawback to this is that popups often show a bare-bones page with no navigation. What's worse though - this or no page at all!?

With the way everything is changing out there the real way to get round this is to not use popups at all. With lots of overly zealous popup-blockers around it's hard to know exactly how you links are going to behave. Get rid of them!

Here's an example link for to play with:

View an image

To disable JavaScript in Firefox open the options dialog and it's on the Web Features page. In IE you need to go to the Security tab of the Internet Options dialog and click on Custom Levels for the Internet zone:

Comments

    • avatar
    • Blop
    • Thu 11 Nov 2004 06:27

    Glad to see you're moving in this direction (accessiblity, that is).

    The technique you illustrate is easy and yet it's so often not implemented.

    BTW: the easiest way to turn JavaScript on and off is to install the Web Accessibility Toolbar for IE ({Link} or Firefox ({Link}

    • avatar
    • Thomas Fleischer
    • Fri 12 Nov 2004 08:35

    Funny to see that your current customer is a company located just around the corner of my house here in Antwerp. small world...

    I agree that it is better to get rid of pop ups with even IE having a pop up blocker now.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Thu 11 Nov 2004

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content