SunQuest
 
           Advanced Web Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignAdvanced Web Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old January 28th, 2004, 07:07 PM
Webnauts Webnauts is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Germany
Posts: 31 Webnauts User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 50 m 4 sec
Reputation Power: 5
Wink Don't force links to open in a new window or popups

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,wid th="+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/[/url]" 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/da...ew_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...02Apr/0100.html

Reply With Quote
  #2  
Old January 28th, 2004, 11:05 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
I couldn't agree with this any further...
One thing that bothers me is the invention of pop-ups that hide in the background...
this just destroys the flow of a site worse than normal popups do!

also frames are somewhat of a huge disliking in my books

Nothing should ever require a target! =)

Reply With Quote
  #3  
Old February 1st, 2004, 05:54 PM
Webnauts Webnauts is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Germany
Posts: 31 Webnauts User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 50 m 4 sec
Reputation Power: 5
Lightbulb I agree ...

Quote:
Originally Posted by MadCowDzz
I couldn't agree with this any further...
One thing that bothers me is the invention of pop-ups that hide in the background...
this just destroys the flow of a site worse than normal popups do!

also frames are somewhat of a huge disliking in my books

Nothing should ever require a target! =)


I agree with you MadCowDzz! Though I compromise with the option, that when designers are bloody-minded, and they want to open new windows, that they at least do them accessible...
__________________
For people without disabilities, technology makes things convenient.
For people with disabilities, it makes things possible. -

ACCESSIBILITY & USABILITY INITIATIVE FORUM
http://www.webnauts.net/phpBB2/index.php

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignAdvanced Web Development > Don't force links to open in a new window or popups


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway