|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Test cases complete. 0 fails.
![]() Join Date: Feb 2001
Location: Melbourne Australia
Posts: 6,568
|
re: New-Window Links in a Standards-Compliant World
Regarding the article by "New-Window Links in a Standards-Compliant World" by Kevin Yank:
http://www.sitepoint.com/article/1041 This is a technical article that does achieve what it says it achieves, but I think it raises an important issue (in my opinion) about usability. While this code works and can achieve what it sets out to while being standards compliant, I believe that whether or not a link opens in a new window should be a decision that is left to me, the viewer. All browsers provide a way of opening a link in a new window. Some browsers provide a way of opening a link in a new tab. Everybody has their own style of surfing the web. Some people prefer to do their surfing in one window, while others like to use many windows and switch between them. Some (in Netscape, Mozilla or Opera) use tabbed browsing, and some use a combination of tabs and multiple windows. If a person's browsing style involves opening links in new windows or tabs, he or she already knows how to do that using a shift-click, a middle mouse button, or a ctrl-click (depending on the browser). I don't think that websites should force this decision upon the viewer, just as I don't think a website should force the viewer to see a webpage at a certain font size. While fixed font size will validate according to XHTML and CSS specifications, it does remove some control over the page from the viewer, and this is why we are now designing pages with variable font sizes (using CSS keywords or relative sizes). I believe we should give viewers the same flexibility when it comes to whether links open in a new window. In terms of usability, I am annoyed when I click a link with my left mouse button and it opens up a new window. I am especially annoyed at this when the link appears to be a regular link - it is the same colour as other links, it has an underline or hover effect and it does not have any text to indicate that it will open in a new window. On the other hand, when I hold down shift and click a link (in IE) and it opens in a new window, I am not annoyed. I expected it to open in a new window. Ideally, in terms of usability, I think that no links should be configured to open in a new window, by default, without the viewer's consent or knowledge. What do you think?
__________________
[mmj] My momentous journey~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The Bit Depth Blog · Twitter · Contact me Spuds Jokes Bazaar VCS Inkscape Firefox phpBB Last edited by mmj; Mar 5, 2003 at 05:51.. |
|
|
|
|
|
#2 |
|
SitePoint resident know-it-all
![]() ![]() Join Date: Apr 2000
Location: Melbourne, Australia
Posts: 3,200
|
The code in the article is actually a generation ahead of that used by the new sitepoint.com, in that it will not hijack your right mouse button clicks. Updating the code in use on sitepoint.com is high on our list of fixes for the site; however, Alex is taking a few days off bug fixing to put together snazzy new designs for our newsletters that match the new site.
As for respecting the user's preference when it comes to new-window links, I totally agree! Being able to enable and disable new-window links is one of the top features planned for the first update to the new SitePoint, which will focus on implementing user preferences with a unified login for the main site and the forums. A sequel to this article explaining how to implement that preference (with a cookie to store it, of course) is definitely in order!
__________________
Kevin Yank CTO, sitepoint.com I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize Baby’s got back—a hard back, that is: The Ultimate CSS Reference |
|
|
|
|
|
#3 |
|
SitePoint Wizard
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Aug 2002
Location: N.Ireland
Posts: 1,038
|
Unless I misunderstood this article, its saying from now on we should use javascript to open new windows, what about browsers with js disabled??! That's crazy if you ask me, no method of navigation should be reliant on javascript surely, or at least you should avoid it if at all possible.
|
|
|
|
|
|
#4 | |
|
SitePoint resident know-it-all
![]() ![]() Join Date: Apr 2000
Location: Melbourne, Australia
Posts: 3,200
|
Quote:
You're correct, no navigation method should rely on JavaScript, but it's OK for you to enhance your navigation with JavaScript.
__________________
Kevin Yank CTO, sitepoint.com I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize Baby’s got back—a hard back, that is: The Ultimate CSS Reference |
|
|
|
|
|
|
#5 | |
|
killall -9 lusers
![]() ![]() ![]() Join Date: Oct 2002
Location: Cincinnati, Ohio, USA
Posts: 395
|
Quote:
__________________
Regards, John Wilger ThatWebThing - Design, Usability and Programming for the Web |
|
|
|
|
|
|
#6 |
|
killall -9 lusers
![]() ![]() ![]() Join Date: Oct 2002
Location: Cincinnati, Ohio, USA
Posts: 395
|
Didn't mean to gang up on you, Daz.
![]()
__________________
Regards, John Wilger ThatWebThing - Design, Usability and Programming for the Web |
|
|
|
|
|
#7 | |
|
SitePoint Addict
![]() ![]() ![]() Join Date: May 2002
Location: Sydney, Australia
Posts: 214
|
Quote:
__________________
Thomas Oeser - Blueprint Software Web Scripting Editor v 5.2 One cool Web editing tool. 3dcomputergraphics.com Coming Soon! |
|
|
|
|
|
|
#8 |
|
gingham dress, army boots...
![]() Join Date: Apr 2002
Location: Salford / Manchester / UK
Posts: 4,850
|
in terms of accessibility, it's actually a bad idea to open new windows (as users lose focus unexpectedly). and in terms of usability, no site should rely on the fact that something is opened in a new window either (e.g. the smiles popup on this forum, which needs to be a popup as otherwise the smile code won't end up in your text edit area).
getting back to device independence, some browsers are not able to spawn new windows (i'm thinking small browsers for PDAs etc). but yes, the main point was made that these links will also work with js disabled. i agree wholeheartedly with mmj in that the ultimate choice lies with the user.
__________________
re·dux (adj.): brought back; returned. used postpositively [latin : re-, re- + dux, leader; see duke.] WaSP Accessibility Task Force Member splintered.co.uk | photographia.co.uk | redux.deviantart.com |
|
|
|
|
|
#9 | |
|
gingham dress, army boots...
![]() Join Date: Apr 2002
Location: Salford / Manchester / UK
Posts: 4,850
|
Quote:
__________________
re·dux (adj.): brought back; returned. used postpositively [latin : re-, re- + dux, leader; see duke.] WaSP Accessibility Task Force Member splintered.co.uk | photographia.co.uk | redux.deviantart.com |
|
|
|
|
|
|
#10 | ||
|
Test cases complete. 0 fails.
![]() Join Date: Feb 2001
Location: Melbourne Australia
Posts: 6,568
|
Quote:
and it is clever Javascript. I was going to mention SitePoint.com in my above post but I decided against it because that's not really what I wanted to focus on. I look forward to seeing it though.I actually went over to Jakob Neilsen's site to see if he said anything about this that I could quote, or even just have a look at to see if I agreed. I couldn't find anything, though I didn't spend too much time searching. I found something about letting users control font size, but nothing about target= or opening links in a new window. If we do choose to use links that automatically open in a new window, how should we indicate this? A dotted or dashed underline is one method that Kevin mentioned, although I don't really see this used in many places at the moment. Some sites I've seen do use a dotted underline to indicate that the link will spawn a popup (like the flash demo on the Editize site for instance). Quote:
The dotted line or icon, or something else could become a defacto standard for indicating what links are going to open in a new window. I'm sort of still of the idealistic view however that if I want to open something in a new window, I can do this myself at any time, if you see what I mean.
__________________
[mmj] My momentous journey~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The Bit Depth Blog · Twitter · Contact me Spuds Jokes Bazaar VCS Inkscape Firefox phpBB Last edited by mmj; Mar 5, 2003 at 07:48.. |
||
|
|
|
|
|
#11 |
|
Web-coding NINJA!
![]() Join Date: Jul 2002
Location: Dallas, TX
Posts: 2,914
|
I'm going to avoid talking about the purpose and the why/why-not of opening links in new windows, but rather just focus on the tech.
On this page I've got a couple window.open driven links that use a class on the anchor tag to give some indication that these links are a bit different than normal. Not exactly sure how well it works, but I like it. Hmm, kev, any particular reason you wanted to use document.getElementsByTagName('a') vs. the document.links collection? I probably would have coded the function this way.. Code:
function externalLinks()
{
if ( !document.links ) return;
for ( var anchor, i = 0; ( anchor = document.links[i] ); i++)
if ( anchor.getAttribute("href" ) && anchor.getAttribute("rel" ) == "external" )
anchor.target = "_blank";
}
![]()
__________________
beetle a.k.a. Peter Bailey blogs: php | prophp | security | design | zen | software refs: dhtml | gecko | prototype | phpdocs | unicode | charsets tools: ide | ftp | regex | ffdev Last edited by beetle; Mar 5, 2003 at 07:58.. |
|
|
|
|
|
#12 | |
|
gingham dress, army boots...
![]() Join Date: Apr 2002
Location: Salford / Manchester / UK
Posts: 4,850
|
from the article:
Quote:
__________________
re·dux (adj.): brought back; returned. used postpositively [latin : re-, re- + dux, leader; see duke.] WaSP Accessibility Task Force Member splintered.co.uk | photographia.co.uk | redux.deviantart.com |
|
|
|
|
|
|
#13 | ||||
|
SitePoint resident know-it-all
![]() ![]() Join Date: Apr 2000
Location: Melbourne, Australia
Posts: 3,200
|
Quote:
Quote:
Quote:
Quote:
__________________
Kevin Yank CTO, sitepoint.com I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize Baby’s got back—a hard back, that is: The Ultimate CSS Reference |
||||
|
|
|
|
|
#14 | |||
|
SitePoint Member
Join Date: Apr 2003
Location: Québec
Posts: 3
|
Quote:
Interestingly enough, the code given by Kevin Yank has a malfunction that you can turn into an advantage. As quoted on the original article : Quote:
So, to demonstrate my point and to take advantage of this (mal?)functionning script simply follow the two following steps : 1- add any kind of definition to your CSS resembling to this (I've created a tiny .gif --> <-- for the purpose of this demonstration, feel free to create a better looking one, that shouldn't be hard) :Code:
a.external
{
background-image: url(http://www.romain.info/gif/ecran.gif);
background-repeat: no-repeat;
background-position: right center;
padding-right: 14px;
}
Quote:
) opening in a new window, a nice icon to inform the internauts that those links will open a new window, and more importantly, all this will still be valid HTML/XML/CSS...Critics are welcome (unless you want to correct my english syntax, pardon my french but english is only my third language), and improvements are encouraged. I'd be really interested in a new icon. I really suck big time when it comes to drawing. |
|||
|
|
|
|
|
#15 |
|
Web-coding NINJA!
![]() Join Date: Jul 2002
Location: Dallas, TX
Posts: 2,914
|
|
|
|
|
|
|
#16 |
|
SitePoint Member
Join Date: Apr 2003
Location: Québec
Posts: 3
|
I didn't know they had this icon, and I presume unless I copy the colors they're using (and I like orange a lot...) I won't have any problems.
I like the idea beneath your logo design. It's intend might be much obvious than mine to the end user... |
|
|
|
|
|
#17 | |
|
SitePoint Member
Join Date: Apr 2003
Location: Québec
Posts: 3
|
Oups, my mistake....
I was terribly wrong :
Quote:
To make it REALLY work you need to adjust slightly the javascript. Instead of this : Code:
anchor.getAttribute("rel") == "external")
Code:
anchor.getAttribute("class") == "external")
|
|
|
|
|
|
|
#18 | |
|
SitePoint Member
Join Date: May 2003
Location: California
Posts: 7
|
Quote:
Reading the article, it struck me that the class attribute was designed to differentiate tags of the same name from each other, e.g. internal links and external links. Using the rel attribute to do this seems like a work-around for a problem that doesn't exist. However, I must agree with mmj: [QUOTE ="mmj"]Ideally, in terms of usability, I think that no links should be configured to open in a new window, by default, without the viewer's consent or knowledge. [/QUOTE] There are certain situations where its preferable to open new windows. For example, when clicking on picture thumbnails, one reasonably expects a new window to open, but those are rare. Forcing users to stay on your site when they have clearly indicated that they wish to leave doesn't seem like a good thing. Its almost adversarial. If your content is that compelling, I will shift-click your external links and surf in parallel. Furthermore, if you didn't want users to leave your site, why did you put a link there? On this code: Code:
function externalLinks()
{
if ( !document.links ) return;
for ( var anchor, i = 0; ( anchor = document.links[i] ); i++)
if ( anchor.getAttribute("href" ) && anchor.getAttribute("rel" ) == "external" )
anchor.target = "_blank";
}
![]() Generally speaking, its a good habit to write code that's self-documenting. Purposely obfuscating your code, while cool and clever, is a nightmare to maintain and debug. |
|
|
|
|
|
|
#19 |
|
SitePoint Zealot
![]() ![]() Join Date: Nov 2002
Location: uk - worcester
Posts: 116
|
Hi, i had a quick look at your site nad the way you have done your links. they are very nice but one question is - on mouse over the icon drops ever so slightly, is this intended ?
|
|
|
|
|
|
#20 |
|
Web-coding NINJA!
![]() Join Date: Jul 2002
Location: Dallas, TX
Posts: 2,914
|
Not entirely - I never messed with it to make that go away, but now that you bring it up I'm sure I know how...
|
|
|
|
|
|
#21 |
|
Organic SEO Expert
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2003
Location: European Union
Posts: 1,488
|
I thought might be interested in the W3C Mailing List Archives, concerning this topic:
http://lists.w3.org/Archives/Public/...thread.html#99 |
|
|
|
|
|
#22 |
|
Organic SEO Expert
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2003
Location: European Union
Posts: 1,488
|
As above discussed, there are several accessibility and usability issues, concerning the opening of new windows....
Here are some interesting sources: Karen Jessett: "Don't make links open in a new window" http://www.jessett.com/web_sites/usa...on.shtml#links Dive into Accessibility: "Not opening new windows" http://diveintoaccessibility.org/day...w_windows.html In general, from my point of view, the argumentations against opening new windows are enough not to do them!!! Everyone must have the right to access and use the Web! |
|
|
|
|
|
#23 | |
|
Organic SEO Expert
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2003
Location: European Union
Posts: 1,488
|
Quote:
See: http://www.useit.com/alertbox/990530.html |
|
|
|
|
|
|
#24 | |
|
SitePoint Wizard
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2001
Location: Atlanta, GA, USA
Posts: 5,024
|
Interesting thread. I am interested in the claims of discrimination against blind users...
Quote:
1. ...controlling the screen environment? 2. ...figuring out the significance of changes and intelligently providing the user with understandable info and options about what is happening? If a screen reader could competently do either of those, the point about discrimination against blind users would be quite the overstatement. My misunderstanding is possibly a function of my ignorance regarding screen readers. For example, I would expect that instead of doing a text recognition thing off a browser, a browser for people with sight problems would simply look directly at the html. If the browser is looking directly at the html, and the target causes problem, then why not simply ignore the target? Honest questions, I really don't know.
__________________
Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio? |
|
|
|
|
|
|
#25 |
|
Organic SEO Expert
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2003
Location: European Union
Posts: 1,488
|
Are pop-up windows relevant to this topic?
|
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 21:12.




[mmj] My momentous journey







<-- for the purpose of this demonstration, feel free to create a better looking one, that shouldn't be hard) :



Linear Mode
