|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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! =) |
|
#3
|
|||
|
|||
|
Quote:
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 |
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Advanced Web Development > Don't force links to open in a new window or popups |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|