Re: [WSG] target=_blank substitute
This is both an accessible and valid method: Valid yes, but accessible? I click on a link. I look at the page. I try to click on the back button. What? Why doesn't this work? Oh. Because it's opened in a new window. Close window. Return to the site (and page) I want to be on. This whole malarkey makes the site less accessible for me, let alone for a person who can't actually see what's going on. a href=foo.html onclick=window.open(this.href);return false; onkeypress=window.open(this.href);return false; title=opens in new windownew window/a If you are going to use JavaScript though, this will do: a href=foo.html onclick=window.open(this.href);return false; title=opens in new windownew window/a onclick is invoked by keyboard action too. Patrick Griffiths (PTG) http://www.htmldog.com/ptg/ http://www.htmldog.com * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help *
Re: [WSG] target=_blank substitute
I'm using that one too. But I had another script that needed to be run when the page loaded, and then the scripts collided, so to speak. So I had to call the functions from body onload=externalLinks();anotherScript(); instead, which works fine. Martin On 18/4-2004, at 5.53, Justin French wrote: On 18/04/2004, at 1:29 PM, Darian Cabot wrote: This is probably obvious... I would like to open a link in a new window. I used to use target=_blank attribute, but that isn't xhtml strict. Can anyone enlighten me on a xhtml strict method? as I'd like my pages to verify ^^ The solution I've settled upon is to include rel='external' instead of target='_blank' on all a tags. Then I link a small JS file in the head of all my pages, which is this: function externalLinks() { if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName(a); for (var i=0; ianchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute(href) anchor.getAttribute(rel) == external) anchor.target = _blank; } } window.onload = externalLinks; This is all basically a straight copy from an article I found on http://www.sitepoint.com a few months back. --- Justin French http://indent.com.au * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help * * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help *
RE: [WSG] target=_blank substitute
You're right, Patrick, but life is a series of compromises. I spend a lot of effort in getting users to my site, and I don't want to go sending them away again with a link on my site. If they want to click on a link external to my site, they get a new window so their existing window stays in my site. It's not accessible, that's true, but if they stay inside my site, no new windows open. And I'm not going to go sending 97% of users out of my site with a link, just so 3% can have an accessible access to that one or two links. We're talking about a minority of links on the site that lead outside the site, and a minority of users who are affected. So I think it's a fair compromise, to make external links less accessible. One of the most important aspects of a site's success is getting traffic and keeping it in the site, and we ought not to lose sight of that in our pursuit of accessibility. What use is a fully accessible site that gets pulled down because it's a failure on economic or other grounds? Cheers Mike Kear Windsor, NSW, Australia AFP Webworks http://afpwebworks.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Griffiths Sent: Sunday, 18 April 2004 7:16 PM To: [EMAIL PROTECTED] Subject: Re: [WSG] target=_blank substitute This is both an accessible and valid method: Valid yes, but accessible? I click on a link. I look at the page. I try to click on the back button. What? Why doesn't this work? Oh. Because it's opened in a new window. Close window. Return to the site (and page) I want to be on. This whole malarkey makes the site less accessible for me, let alone for a person who can't actually see what's going on. [snip] Patrick Griffiths (PTG) http://www.htmldog.com/ptg/ http://www.htmldog.com * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help *
Re: [WSG] target=_blank substitute
You're right, Patrick, but life is a series of compromises. I spend a lot of effort in getting users to my site, and I don't want to go sending them away again with a link on my site. If they want to click on a link external to my site, they get a new window so their existing window stays in my site. It's not accessible, that's true, but if they stay inside my site, no new windows open. And I'm not going to go sending 97% of users out of my site with a link, just so 3% can have an accessible access to that one or two links. OK. Let's forget about accessibility for a moment then. The back button is one of the most commonly used navigational tools. By opening new windows you disable that feature. You're hindering usability and actually making it more effort for people to come back to your site. It's just not possible to lock people into your site. If they want to go away from it, they're going to. If they want to come back to it, that's great but keeping your site in the background isn't going to help that at all - they know they should be able to reach it by a 'click' or two of the back button. Patrick Griffiths (PTG) http://www.htmldog.com/ptg/ http://www.htmldog.com * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help *
RE: [WSG] target=_blank substitute
I agree. My intention for opening links in new windows was for a very few links. Only the feature website of the month as a sample to vistors. Oh, and I will be giving the viewer the option to open the link in a new window or in the current window, so no suprises there. Thanks for all the help! You're right, Patrick, but life is a series of compromises. I spend a lot of effort in getting users to my site, and I don't want to go sending them away again with a link on my site. If they want to click on a link external to my site, they get a new window so their existing window stays in my site. It's not accessible, that's true, but if they stay inside my site, no new windows open. And I'm not going to go sending 97% of users out of my site with a link, just so 3% can have an accessible access to that one or two links. We're talking about a minority of links on the site that lead outside the site, and a minority of users who are affected. So I think it's a fair compromise, to make external links less accessible. One of the most important aspects of a site's success is getting traffic and keeping it in the site, and we ought not to lose sight of that in our pursuit of accessibility. What use is a fully accessible site that gets pulled down because it's a failure on economic or other grounds? Cheers Mike Kear Windsor, NSW, Australia AFP Webworks http://afpwebworks.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Griffiths Sent: Sunday, 18 April 2004 7:16 PM To: [EMAIL PROTECTED] Subject: Re: [WSG] target=_blank substitute This is both an accessible and valid method: Valid yes, but accessible? I click on a link. I look at the page. I try to click on the back button. What? Why doesn't this work? Oh. Because it's opened in a new window. Close window. Return to the site (and page) I want to be on. This whole malarkey makes the site less accessible for me, let alone for a person who can't actually see what's going on. [snip] Patrick Griffiths (PTG) http://www.htmldog.com/ptg/ http://www.htmldog.com * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help * Darian Cabot -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Cabot Consultants Pty Ltd Software Engineer / Website Design http://www.cabotconsultants.com.au -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help *
RE: [WSG] target=_blank substitute
Patrick - A practical example which will serve to illustrate my point. Go to the Microsoft.com site, and decide whether to install any update. (Choose any of them, they're all just as bad as each other.) In order to install this update, you have to have this other update installed. Oh... do I have that installed? Better click on that link to read what it was about. Nope. Never heard of that one. But before I can install that update, I have to have this other one installed. Have I got that one installed? Who the hell knows. Better click on this link to find out what this previous update was all about. But there are implications with installing that update, because there's a link to read this before installing this update. Click on that link. Now where are you? Can you install that first update or not? Navigating anywhere in Microsoft's site is a nightmare. You go down a maze of links until its almost impossible to work your way back where you came from. You mention the 'back' button. What about alt-tab? I use that far more than 'back'. The issue is not as clear-cut as you seem to say. I'm not saying my way is the 'right' way and others are 'wrong'. Just that it's like most things on the web- there are several ways to do anything and pros and cons for each. In my case, I get someone into my site, and I don't want to see them heading off again by just clicking on a tool my site gives them to leave. Cheers Mike Kear Windsor, NSW, Australia AFP Webworks http://afpwebworks.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Griffiths Sent: Sunday, 18 April 2004 8:20 PM To: [EMAIL PROTECTED] Subject: Re: [WSG] target=_blank substitute You're right, Patrick, but life is a series of compromises. I spend a lot of effort in getting users to my site, and I don't want to go sending them away again with a link on my site. If they want to click on a link external to my site, they get a new window so their existing window stays in my site. It's not accessible, that's true, but if they stay inside my site, no new windows open. And I'm not going to go sending 97% of users out of my site with a link, just so 3% can have an accessible access to that one or two links. OK. Let's forget about accessibility for a moment then. The back button is one of the most commonly used navigational tools. By opening new windows you disable that feature. You're hindering usability and actually making it more effort for people to come back to your site. It's just not possible to lock people into your site. If they want to go away from it, they're going to. If they want to come back to it, that's great but keeping your site in the background isn't going to help that at all - they know they should be able to reach it by a 'click' or two of the back button. Patrick Griffiths (PTG) http://www.htmldog.com/ptg/ http://www.htmldog.com * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help *
Re: [WSG] target=_blank substitute
Many clients have been told time after time that for external links you should always open a new window this is going to be a problem for quite a while, until we can convince people this is not necessary, I believe that this or Justin's way of dealing with external links is a practical solution to a very real client problem. I absolutely agree. If we're talking about *having* to do it then we do it. But if we're talking about best practices it's a different matter. Patrick Griffiths (PTG) http://www.htmldog.com/ptg/ http://www.htmldog.com * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help *
Re: [WSG] target=_blank substitute
Darian Cabot spoke the following wise words on 18/04/2004 1:29 PM EST: I would like to open a link in a new window. I used to use target=_blank attribute, but that isn't xhtml strict. Can anyone enlighten me on a xhtml strict method? as I'd like my pages to verify ^^ Check out XHTML target module: http://www.accessify.com/tutorials/standards-compliant-new-windows.asp http://www.webreference.com/xml/column30/ http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_targetmodule http://www.nic.fi/~tapio1/HTMLKit/Attributes2Mod.php3 The DTD: http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-target-1.mod -- tim lucas www.toolmantim.com smime.p7s Description: S/MIME Cryptographic Signature
Re: [WSG] target=_blank substitute
Tim said Check out XHTML target module:. You can see a tutorial about this, posted a while ago at the Webmates forum: http://excellentsite.org/agroup/modules/newbb/viewtopic.php?topic_id=36foru m=1 Direct link to the tutorial by Eva Lindqvist: http://www.swedishgoldenretrievers.net/targetmoduleinxhtml.shtml Carlos www.cb2web.com - Original Message - From: Tim Lucas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 18, 2004 4:41 PM Subject: Re: [WSG] target=_blank substitute Darian Cabot spoke the following wise words on 18/04/2004 1:29 PM EST: I would like to open a link in a new window. I used to use target=_blank attribute, but that isn't xhtml strict. Can anyone enlighten me on a xhtml strict method? as I'd like my pages to verify ^^ Check out XHTML target module: http://www.accessify.com/tutorials/standards-compliant-new-windows.asp http://www.webreference.com/xml/column30/ http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_targetmodu le http://www.nic.fi/~tapio1/HTMLKit/Attributes2Mod.php3 The DTD: http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-target-1.mod -- tim lucas www.toolmantim.com * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help *
RE: [WSG] target=_blank substitute
Hi Michael Navigating anywhere in Microsoft's site is a nightmare. You go down a maze of links until its almost impossible to work your way back where you came from. Is this an argument against the usefulness of the back button (or the navigation metaphor entirely)? If Microsoft chose to open links in new windows you'd end up with a mess of windows, rather than a messy history. This is not an improvement. Microsoft's site is poorly designed. How is this relevant to the argument? :) In my case, I get someone into my site, and I don't want to see them heading off again by just clicking on a tool my site gives them to leave. Not only are you working against the navigation metaphor, you're working against yourself when you force links to open in new windows. Example: 1. User finds your site, browses around it, finds external links. 2. User clicks link, fresh new window is opened. 3. User is done with your site, and closes your window. 4. User browses site opened in new window, realises there was something else they wanted to use your site for. 5. Uh oh. Is your site so great that they're going to do the work to get back to it (by Googling for it, or braving their history), or are they just going to go some place else? If a user really wants to open a new window for a link, she can: right-click, Open in New Window, or middle-click if it's available. If you're forcing new windows to open when links are clicked, there is no way for the user to choose to open the links in the original window and maintain the metaphor. You are taking a meaningful choice away from the user. Granted, there are pros for the behaviour that you're arguing for -- but there are so many cons! Cheers, -- Andrew Taumoefolau * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help *
Re: [WSG] target=_blank substitute
CB2 Wow thanks for that GREAT link! As soon as I read how to pull it all off, I set it up on my site! www.neester.com/tdir Looks the same, works teh same, validates the same... but it validates with target="_blank" thanks a lot! Chris Stratford [EMAIL PROTECTED] Http://www.neester.com Cb2 Web Design wrote: Tim said "Check out XHTML target module:". You can see a tutorial about this, posted a while ago at the Webmates forum: http://excellentsite.org/agroup/modules/newbb/viewtopic.php?topic_id=36foru m=1 Direct link to the tutorial by Eva Lindqvist: http://www.swedishgoldenretrievers.net/targetmoduleinxhtml.shtml Carlos www.cb2web.com - Original Message - From: "Tim Lucas" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 18, 2004 4:41 PM Subject: Re: [WSG] target="_blank" substitute Darian Cabot spoke the following wise words on 18/04/2004 1:29 PM EST: I would like to open a link in a new window. I used to use target="_blank" attribute, but that isn't xhtml strict. Can anyone enlighten me on a xhtml strict method? as I'd like my pages to verify ^^ Check out XHTML target module: http://www.accessify.com/tutorials/standards-compliant-new-windows.asp http://www.webreference.com/xml/column30/ http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_targetmodu le http://www.nic.fi/~tapio1/HTMLKit/Attributes2Mod.php3 The DTD: http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-target-1.mod -- tim lucas www.toolmantim.com * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help * * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help *