[wp-hackers] XHTML Strict compliant replacement for target=_new

Eric A. Meyer eric at meyerweb.com
Thu Oct 27 17:23:25 GMT 2005


At 9:24 AM +0200 10/23/05, Luc Saint-Elie wrote:

>With the use of rel="external" (that by the way is 150% standard and 
>any buzzword compliant) and a DOM manipulation using javascript :
>
>- There is absolutely no problem with browsers not supporting 
>javascript and/or with Javascript deactivated

    Agreed.  This is exactly how I let presentation authors mark a 
link as needing to spawn a new window in S5[1], same 'rel' value and 
some JS.
    I'm not entirely certain that the value of 'external' makes the 
most sense, though.  All 'rel' does is provide a way to define the 
relationship of the target resource to the current resource.  Thus, 
'rel="stylesheet"' means "the document that's the target of this 
'link' is a style sheet for this document". All other pages are 
external to the current page, after all, regardless of whether or not 
the author wants a link to open new window, so they all technically 
have a 'rel="external"'.  Or you could assume that's the default case 
and only mark inter-document links 'rel="internal"' or 'rel="me"' or 
something.
    Similarly, 'rev', which means "the relationship this document has 
to that one", doesn't really work either.  What we're really 
discussing here is a UI behavior (a deeply annoying one, I agree, but 
authors still want it), not an intra-document relationship.  I 
suspect that adding a 'class="newwindow"' or something similar is as 
semantically pure as you could hope to get within the confines of 
XHTML Strict.
    Assuming you were committed to keeping your semantics pure while 
dirtying your UI behavior, of course.

[1] http://meyerweb.com/eric/tools/s5/

-- 
Eric A. Meyer  (eric at meyerweb.com)
Principal, Complex Spiral Consulting   http://complexspiral.com/
"CSS: The Definitive Guide," "CSS2.0 Programmer's Reference,"
"Eric Meyer on CSS," and more    http://meyerweb.com/eric/books/


More information about the wp-hackers mailing list