[Accessibility_sig] link question
Jon Gibbins (dotjay)
dotjay at november5th.net
Tue Jan 30 04:36:29 CST 2007
I second Michael's approach - if you insist on opening links in a new
window, roll back your doctype.
Speaking of JavaScript though, I have an unobtrusive JavaScript function
that will accomplish opening in a new window using when using XHTML
Strict, which is based upon the ideas and code here:
http://www.brucelawson.co.uk/index.php/2005/opening-links-in-new-windows-in-xhtml-strict/
http://www.brucelawson.co.uk/index.php/2005/opening-links-in-new-windows-in-xhtml-strict-2/
This, of course, relies on JavaScript and specifying your external links
as rel="external", but that also means that you have the opportunity to
give users a choice as to whether or not certain links open in a new
window or not - you can provide a JavaScript mechanism to set a cookie
with their option, which is then detected by your JavaScript "new
window" function.
However, that could be construed as fixing something that user agents
should really be doing.
Jon
Moore, Michael wrote:
> The simplest thing is to change to a doctype that does support the
> target attribute. HTML 4.01 is fine. However, simply using the target
> attribute does not indicate to anything other than the browser that the
> target will open in a new window. The best approach is to include text
> in the link itself that indicates that link opens in a new window. A
> relatively unobtrusive way to do with is use an icon representing
> external content and put the text that indicates that a new window will
> open in the alt text. Wrap the icon in the link text. Ex. <p>For more
> information about Access U visit <a
> href="http://www.knowbility.org/">Knowbility.org<img src="myPic.gif"
> alt="opens in a new window"></a></p>.
>
> If you still want to use XHTML strict, you will need to use JS to open
> the new window. That is a topic for another day.
>
> Mike
>
> -----Original Message-----
> From: accessibility_sig-bounces at knowbility.org
> [mailto:accessibility_sig-bounces at knowbility.org] On Behalf Of Aimee
> Ronn (Knowbility)
> Sent: Monday, January 29, 2007 2:08 PM
> To: accessibility_sig at knowbility.org
> Subject: [Accessibility_sig] link question
>
> Hi Everyone,
>
> In my XHTML Strict 1.0 code, I want to indicate that a link opens up in
> a new window, but XHTML Strict 1.0 does not support target="_blank".
> Would someone please explain how to accomplish this?
>
> Thanks.
>
> - Aimee Ronn
--
november5th.net
dotjay.co.uk
More information about the Accessibility_sig
mailing list