Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!


Sponsored Content

 

 
 

Photo
- - - - -

Don't Open New Windows


  • Please log in to reply
10 replies to this topic

#1 Webnauts

Webnauts

    HR 3

  • Active Members
  • PipPipPip
  • 95 posts
  • Location:Germany

Posted 04 October 2003 - 04:04 AM

ACCESSIBILITY TOPIC

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="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="+strWidth+",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="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://diveintoacces...ew_windows.html
Use interim solutions: http://www.w3.org/TR...m-accessibility
Opening a link in a new window: http://lists.w3.org/...02Apr/0100.html

If you still have questions, please feel free to post them.

Edited by Webnauts, 09 October 2003 - 07:18 AM.


#2 qwerty

qwerty

    HR 10

  • Moderator
  • 8,294 posts
  • Location:Somerville, MA

Posted 04 October 2003 - 07:59 AM

If you have a page of outbound links and they're all set to open in a new window (which is my normal practice), do you think it would be acceptable to have a single message at the top of the page indicating that fact, or should it be specified on each link, as you suggested?

#3 Scottie

Scottie

    Psycho Mom

  • Admin
  • 6,293 posts
  • Location:Columbia, SC

Posted 04 October 2003 - 08:01 AM

Definitely one message for all, IMO.

#4 Webnauts

Webnauts

    HR 3

  • Active Members
  • PipPipPip
  • 95 posts
  • Location:Germany

Posted 04 October 2003 - 12:35 PM

If you have a page of outbound links and they're all set to open in a new window (which is my normal practice), do you think it would be acceptable to have a single message at the top of the page indicating that fact, or should it be specified on each link, as you suggested?

Have a look what I have done for this case on my web site: http//www.webnauts-akademie.de

#5 qwerty

qwerty

    HR 10

  • Moderator
  • 8,294 posts
  • Location:Somerville, MA

Posted 04 October 2003 - 12:46 PM

Webnauts, I'm afraid I'm now a little more confused. Your link to check WCAG validation at the bottom of the page has the indication that the page will open in a new window in the alt attribute rather than the title. So for users not on IE, who have images turned on, they won't see that message.

title="Explanation of Level A Conformance" target="_blank"

alt="&Ouml;ffnet neues Browser Fenster zu W3C/WAI Level AAA conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0"


Am I missing something here?

#6 Webnauts

Webnauts

    HR 3

  • Active Members
  • PipPipPip
  • 95 posts
  • Location:Germany

Posted 04 October 2003 - 08:22 PM

Webnauts, I'm afraid I'm now a little more confused. Your link to check WCAG validation at the bottom of the page has the indication that the page will open in a new window in the alt attribute rather than the title. So for users not on IE, who have images turned on, they won't see that message.

title="Explanation of Level A Conformance" target="_blank"

alt="&Ouml;ffnet neues Browser Fenster zu W3C/WAI Level AAA conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0"


Am I missing something here?


Hey thanks! I think I do miss something! I maybe must fix this issue!!!
Great comment! Even though, when images are turned off, the alt tag appears on the screen, and screen readers will tell them.

By the way, I must re-examine this fact! Thanks again.

#7 csjavi

csjavi

    HR 4

  • Active Members
  • PipPipPipPip
  • 148 posts
  • Location:Tampere, Finland

Posted 05 October 2003 - 02:44 AM

The client in me says:
I want total control over my browsing experience. If I want to open a new page in another window or tab, I'll do it myself. :rant: Redirects that break the back button, pop-ups and links that open in a new window are full of :)

The webmaster in me says:
My content is the best there is in my rather small and specialized market. The client will return to my site if (s)he is in any way interested. I don't need links that open in new windows.

#8 Webnauts

Webnauts

    HR 3

  • Active Members
  • PipPipPip
  • 95 posts
  • Location:Germany

Posted 09 October 2003 - 07:19 AM

My above tutorial is slightly updated.

#9 mopacfan

mopacfan

    HR 3

  • Active Members
  • PipPipPip
  • 103 posts
  • Location:Missouri

Posted 09 October 2003 - 08:47 AM

I disagree with the notion that you should not use new windows for outgoing links. There are many times when it's appropriate to open a link in a new window. For example, on my site, I want visitors to click on my sponsors logos to get more information. I don't, however, want them leaving my site just to check out a set of tires or off road lights. By opening in a new window, the user can easily get back to my content without being concerned how many times they have to click the back button.

I do agree with the notion of placing some sort of tag somewhere explaining that the content will open in a different window, especially with pop-up blockers being so prevalent. I'll have to add something to my site to make that clear.

#10 daniel

daniel

    HR 4

  • Active Members
  • PipPipPipPip
  • 234 posts
  • Location:UK

Posted 09 October 2003 - 09:41 AM

Opening links in new windows is fine as long as that is what the visitor knows that it is happening.

I like the way Yahoo search gives the option to open the link in a new window.

There is however something that is far more annoying to me than a new window being opened, and that's links to PDF files that do not indicate that the resource being linked to is a PDF file. This is particularly annoying on a dial-up connection.

During usability testing, I've also seen less experienced users click on a link for it to start Acrobat Reader in order to view the PDF file. They wait a few seconds to see what's going on, and then once it's loaded they close the window (assuming that a new application has loaded, and they want to return to the website they were viewing). Then they sit there perplexed as to where the website has gone.

If you're going to open a new window, or link to a PDF (or similar resource) the least you can do is explain this to the visitor beforehand.

Just my opinions, of course.

#11 qwerty

qwerty

    HR 10

  • Moderator
  • 8,294 posts
  • Location:Somerville, MA

Posted 09 October 2003 - 09:53 AM

I would add to that that if you're going to link to a PDF file, you ought to provide a link to the Acrobat download page. It also doesn't hurt to put up the logo for the file as it further makes the point that you're linking to something that requires a plug-in.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users