www.webdeveloper.com
Results 1 to 7 of 7

Thread: Avoid forcing links to open in a new window

  1. #1
    Join Date
    Nov 2003
    Location
    Germany, Europe
    Posts
    100

    Thumbs up Avoid forcing links to open in a new window

    Actually you should avoid forcing links to open in a new window or popups (such as with the "target" attribute or with JavaScript).

    As you might know, JavaScript is not supported by all browsers and some users disable it. When JavaScript is used, it should not be relied upon.
    In such cases you will disable your visitor to access your content.

    You should avoid as far as possible implementing JavaScript, to avoid running risks on complications on the end users machines, or while goverment and other employees are required to disable this feature, for security or other reasons. Also there is a number of users who are very concerned about security issues and disable this feature too.

    The issue here is not only concerning users disabling JavaScript in their browsers. How many do so? 8%?

    What about cell phone users? How about sight impaired users? For the ones who when changing the current window or popping up new windows can be very disoriented, while they cannot see that this has happened. And how much percent are they?

    Radical changes of focus in a GUI environment are extremely disorienting to blind users who are navigating by screen reader, and thus can be considered discrimination against the visually impaired.

    - Opening a link in a new window also breaks the back' button on the browser, preventing back-tracking in navigation;

    - It also bypasses the tabbed navigation in Galeon and Mozilla, irritating users of that feature;

    - If your user wants to open the link in a new window, he or she can do so quite easily with most browsers; there is no need to force the issue;

    - It's about leaving the user the freedom to navigate in the way that works best for him or her;

    - It's not unusual for a designer never to have thought about such issues; that's why we have the WCAG to point out to us things we might otherwise overlook. Or?

    What does the usability professional Jakob Nielsen say about all this?

    JavaScript in Links.

    Links are the Web's basic building blocks, and users' ability to understand them and to use various browser features correctly is key to enhancing their online skills.

    Links that don't behave as expected undermine users' understanding of their own system. A link should be a simple hypertext reference that replaces the current page with new content. Users hate unwarranted pop-up windows. When they want the destination to appear in a new page, they can use their browser's "open in new window" command -- assuming, of course, that the link is not a piece of code that interferes with the browser’s standard behavior.

    Users deserve to control their own destiny. Computers that behave consistently empower people by letting them use their own tools and wield them accurately.
    Source was found here: http://www.useit.com/alertbox/20021223.html

    Another fact is, that if you markup with XHTML 1.1 Strict, the "target=_blank" is not supported!

    Though you still can achieve opening a new window, even if JavaScript is disabled in your browser.

    If you do so, see in which cases it would make sence, as Neil Turner describes in his article "Beware of Opening Links in a New Window", published at SitePoint.com:

    - If a link is for a document, such as a PDF, RTF or Word file. Opening a new window will allow the image or document to download in the background. It also prevents users from accidentally closing the browser window when they close the document.

    - If a link is for a large image. In this case, a new window allows the Web user to keep a browser window open while the image is being downloaded.

    - If a link is for a printable version of an article or Web page. Here, a new window allows users to keep the current window open while they print the page or article in the background.
    For each of these instances, use text and an icon to indicate that a new browser window will open:

    So 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";
    Adding an icon like this http://www.webnauts.net/images/open.gif, would be even more convenient.

    Here is an example: http://www.webnauts.net/popup.html

    If JavaScript is disabled in your browser, a new window will still open!

    Further reading:
    Not opening new windows: http://diveintoaccessibility.org/day_16_no...ew_windows.html
    Use interim solutions: http://www.w3.org/TR/WCAG10/#gl-interim-accessibility
    Last edited by Webnauts; 09-29-2005 at 08:40 AM.

  2. #2
    Join Date
    Dec 2004
    Location
    Neca Valley, Pennsyltucky
    Posts
    388
    Click the link for irony.

  3. #3
    Join Date
    Nov 2003
    Location
    Germany, Europe
    Posts
    100
    Originally posted by Triumph
    Click the link for irony.
    No need to anymore...

  4. #4
    Join Date
    Sep 2005
    Posts
    11
    I want the code in javascript to disabling the close button of the window...plzzz help its urgent

  5. #5
    Join Date
    Nov 2003
    Location
    Germany, Europe
    Posts
    100
    Did I understand you right? Do you want to disable the button closing a window?

  6. #6
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    The window close button is not a part of the web page being displayed and is therefore not able to be accessed via Javascript.
    Stephen

  7. #7
    Join Date
    Nov 2002
    Location
    XYZZY - UK
    Posts
    1,760
    Well, you are asking in the wrong area as this subsection is about accessibility.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles