Results 1 to 7 of 7

Thread: Avoid forcing links to open in a new window

  1. #1
    Join Date
    Nov 2003
    Germany, Europe

    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
    Neca Valley, Pennsyltucky
    Click the link for irony.

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

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

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

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

  7. #7
    Join Date
    Nov 2002
    XYZZY - UK
    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



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.21005 seconds
  • Memory Usage 2,917KB
  • Queries Executed 13 (?)
More Information
Template Usage (33):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (7)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • bbcode_parse_start
  • postbit_imicons
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates