WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Popup Window idea

for

From: Christian Heilmann
Date: Jul 25, 2005 9:15AM


> > As an example, I am writing a script to allow for
> > "accessible" pop-up windows. I had an idea I hadn't seen yet
> > before and wondered if I should pursue with it.
> Is that something we actually need? ;o)

I don't. Clients might. And junior developers who need to deliver
things or lose their jobs.

> * We can not assume that the end-user wants pop-ups

That is why we are not talking about unsolicited popups, but those who
tell the user they are popups and will not popup when you right click
or drag them.
God, "POPUP" is such a Pavlov word.

> * while the target attribute works, it's not valid xhtml and that
> may cause issues with certain sites. Additionally, many folks
> believe that javascript is the proper technology for modifying
> the windows, pop-ups being one of those places to use it.

Yes, that is why I want to use rel and rev...

> > would be changed by the script to a link opening the new
> > window and get a message attached that it does so.
> > <a href="parent.html" rev="popuptrigger">back</a>
>
> At this point, I'd have to strongly suggest that if you have a need for a
> 'back' link in a pop-up, then you shouldn't be using a pop-up window to
> begin with.

Actually this back link works when the popup didn't popup and will be
replaced by a window.close() when it has popped up. I am aware that
there is no real need for a "close window" button, but many designers
and usability experts will disagree with me there.

> Also, this type of behavior will act oddly if one hadn't popped up the
> specific window. Ie, if I open your window in a new tab, why would 'back'
> then close my tab?

It wouldn't:

" * When we have JavaScript enabled and we have a window.opener, we can
assume that the window was opened and we can add window.close() links."

no window.opener, no window.close(); It will link back to the original
page though, but that's what you will always get when you open in a
new tab.

> > Any comments why that is a bad idea and what would be a better one?
> > Yes, I will point out that popups should be avoided.
>
> I wouldn't bother with the whole 'back' issue. Instead, I'd focus more on
> the presentation of the link itself. Emphasize that if you are going to
> create a pop-up link, do the following:
>
> - retain an actual HREF (for the reasons noted above)
> - make the link clearly indicate that a pop-up window will appear
> (via an icon or text)
> - when possible, have the pop-up link icon/text be written/styled by
> javascript. If the client doesn't have javascript, then they won't
> be confused with the pop-up links.
> - make the pop-up window artificially small (yet resizable) so that
> it is clear that a new window was created.
> If it's clearly a link to a pop-up window, then they will be more aware that
> a new window is coming. At that point, they can usually fine the 'close
> window' widget themselves.

This is all taken care of. The real feedback I was wondering about is
if it is a good idea to use rel and rev for popups or not. ;-)

--
Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/