E-mail List Archives
Re: re[2]: opening new browser windows?
From: John Britsios
Date: Nov 6, 2003 1:48PM
- Next message: webmaster@theoryxdesign.com: "re: META REFRESH (Was: RE: opening new browser windows?)"
- Previous message: webmaster@theoryxdesign.com: "re[2]: opening new browser windows?"
- Next message in Thread: Mark Bryant: "Re: re[2]: opening new browser windows?"
- Previous message in Thread: webmaster@theoryxdesign.com: "re[2]: opening new browser windows?"
- View all messages in this Thread
Actually you should not force links to open in a new window or popups (such
as with the "target" attribute or with JavaScript).
Changing the current window or popping up new windows can be very
disorienting to users who cannot see that this has happened.
As you might also know, JavaScript is not supported by all browsers and some
users disable it. When JavaScript is used, it should not be relied upon.
Another fact is, that if you markup with XHTML Strict, the "target=_blank"
is not supported!
If you absolutely must open a link in a new window, explicitly warn the user
with a clear indication that the page will open in a different window.
Provide a title attribute on the anchor tag with a description indicating
that the link opens a new window; for example:
<a href="<A href="http://www.eypd2003.org">http://www.eypd2003.org"
target="_blank" title="Link opens in new window.">European Year of People
with Disabilities 2003 (new window)</a>
If you want to build an accessible pop-up window, add the code below within
the head tags of your HTML document:
<script type="text/javascript">
var newWindow = null;
function closeWin(){
if (newWindow != null){
if(!newWindow.closed)
newWindow.close();
}
}
function popUpWin(url, type, strWidth, strHeight){
closeWin();
if (type == "fullScreen" ){
strWidth = screen.availWidth - 10;
strHeight = screen.availHeight - 160;
}
var tools="";
if (type == "standard" || type == "fullScreen" ) tools "resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+strWi
dth+",height="+strHeight+",top=0,left=0";
if (type == "console" ) tools "resizable,toolbar=no,location=no,scrollbars=no,width="+strWidth+",height="+
strHeight+",left=0,top=0";
newWindow = window.open(url, 'newWin', tools);
newWindow.focus();
}
</script>
Above script source: http://www.accessify.com
Then add your link in the body of your document as below:
<a href="<A href="http://www.w3.org/WAI/">http://www.w3.org/WAI/"
onclick="popUpWin(this.href,'standard',640,480);return false;"
onkeypress="popUpWin(this.href,'standard',640,480);return false;"
title="Link open's in a new window">Web Accessibility Initiative (WAI)</a>
Example see here: http://www.webnauts.net/popup.html
Test this turning off JavaScript to see how it works!
Further reading:
Not opening new windows:
http://diveintoaccessibility.org/day_16_not_opening_new_windows.html
Use interim solutions: http://www.w3.org/TR/WCAG10/#gl-interim-accessibility
Opening a link in a new window:
http://lists.w3.org/Archives/Public/www-validator/2002Apr/0100.html
----- Original Message -----
From: < <EMAIL REMOVED> >
To: < <EMAIL REMOVED> >; < <EMAIL REMOVED> >
Sent: Thursday, November 06, 2003 9:43 PM
Subject: re[2]: opening new browser windows?
> No. I cannot elaborate. Please do not mistake my tone, but I really do
mean exactly what I've said.
> Any new window is bad.
>
> What is the purpose for a new window?
> Potential answers:
> 1) "Keep them in my site" - Why? Because they can't find their way back?
To annoy them by making them close new windows?
> 2) "For supplemental content" - This is clearly an Information
Architecture problem. I have seen one supplemental window that I thought
was well done - a glossary of terms on a mortgage site.
>
>
>
> >> I disagree about the clearness. "Any new window is bad" is not very
> >> helpful. Can you elaborate?
>
> >> -mark
>
> >> ----- Original Message -----
> >> From: < <EMAIL REMOVED> >
> >> To: < <EMAIL REMOVED> >; < <EMAIL REMOVED> >
> >> Sent: Thursday, November 06, 2003 3:03 PM
> >> Subject: re: opening new browser windows?
>
>
> >> > I think the guideline is quite clearly worded "do not cause
pop-ups or
> >> other windows to appear"
> >> > Any new window is bad.
> >> >
> >> >
> >> >
> >> >
> >> > >> What is the proper way to handle a link that when clicked,
opens a
> >> new
> >> > >> browser window (target=_blank)? Does it need to be
addressed for
> >> > >> accessibility and if so, why and how?
> >> >
> >> > >> I have read in the WAI about Checkpoint 10.1 "Until user
agents
> >> allow
> >> > >> users
> >> > >> to turn off spawned windows, do not cause pop-ups or other
windows
> >> to
> >> > >> appear
> >> > >> and do not change the current window without informing the
user.
> >> [Priority
> >> > >> 2]".
> >> >
> >> > >> Seems like this only applies to server spawned windows and
not
> >> user
> >> > >> initiated clicking?
> >> >
> >> > >> TIA,
> >> > >> -mark
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > >> ----
> >> > >> To subscribe, unsubscribe, suspend, or view list archives,
> >> > >> visit http://www.webaim.org/discussion/
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > Karl Groves - Certified Master CIW
> >> > http://www.karlcore.com
> >> >
> >> > AOL, MSN, YAHOO Users IM me at - "KarlCore"
> >> >
> >> >
> >> > Visit my favorite places:
> >> >
> >> > Baltimore Punk & Hardcore
> >> > http://www.baltimorepunk.com
> >> >
> >> >
> >> > Punk Rock Worldwide
> >> > http://www.punkrockworldwide.com
> >> >
> >> >
> >> > United States Neapolitan Mastiff Club's Rescue Program
> >> > http://www.neorescue.org
> >> >
> >> >
> >> >
> >> > ----
> >> > To subscribe, unsubscribe, suspend, or view list archives,
> >> > visit http://www.webaim.org/discussion/
> >> >
>
>
>
> >> ----
> >> To subscribe, unsubscribe, suspend, or view list archives,
> >> visit http://www.webaim.org/discussion/
>
>
>
>
>
>
>
>
> Karl Groves - Certified Master CIW
> http://www.karlcore.com
>
> AOL, MSN, YAHOO Users IM me at - "KarlCore"
>
>
> Visit my favorite places:
>
> Baltimore Punk & Hardcore
> http://www.baltimorepunk.com
>
>
> Punk Rock Worldwide
> http://www.punkrockworldwide.com
>
>
> United States Neapolitan Mastiff Club's Rescue Program
> http://www.neorescue.org
>
>
>
> ----
> To subscribe, unsubscribe, suspend, or view list archives,
> visit http://www.webaim.org/discussion/
>
>
----
To subscribe, unsubscribe, suspend, or view list archives,
visit http://www.webaim.org/discussion/
- Next message: webmaster@theoryxdesign.com: "re: META REFRESH (Was: RE: opening new browser windows?)"
- Previous message: webmaster@theoryxdesign.com: "re[2]: opening new browser windows?"
- Next message in Thread: Mark Bryant: "Re: re[2]: opening new browser windows?"
- Previous message in Thread: webmaster@theoryxdesign.com: "re[2]: opening new browser windows?"
- View all messages in this Thread