'target' attribute of anchor depreciated?

Discussion in 'HTML & Website Design' started by JamieC, Oct 10, 2005.

  1. #1
    Just out of interest, what is the correct way of getting a link to open in a new window in both HTML 4.01 and XHTML 1.1?

    I still use the target='_blank' attribute but there must be a different way by now. No?

    - Jamie
     
    JamieC, Oct 10, 2005 IP
  2. JeremyMiller

    JeremyMiller Guest

    Messages:
    13
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    That should work. Did you create 2 sample pages to test?
     
    JeremyMiller, Oct 10, 2005 IP
  3. someonewhois

    someonewhois Peon

    Messages:
    177
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #3
    No. The correct way is to not have links opening in a new window. It's inaccessible. If you let them open in the same window, you give the user the option to open in the same window or open in a new window/tab. If you add target="_blank" to it, you're eliminating their choice.

    It drives me nuts how DP links open in a new window by default. I like to open then hit the back button. If I liked to open in a new tab, I would know to middle click it. DP doesn't give this choice, they force the option onto you.
     
    someonewhois, Oct 10, 2005 IP
  4. Smyrl

    Smyrl Tomato Republic Staff

    Messages:
    13,740
    Likes Received:
    1,702
    Best Answers:
    78
    Trophy Points:
    510
    #4
    Some of us don't have middle clickers.

    Shannon
     
    Smyrl, Oct 10, 2005 IP
  5. someonewhois

    someonewhois Peon

    Messages:
    177
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Then ctrl click, shift click, right click and then select, etc.
     
    someonewhois, Oct 10, 2005 IP
  6. Smyrl

    Smyrl Tomato Republic Staff

    Messages:
    13,740
    Likes Received:
    1,702
    Best Answers:
    78
    Trophy Points:
    510
    #6
    Do you really think that sequence is worth it?

    Shannon
     
    Smyrl, Oct 10, 2005 IP
  7. someonewhois

    someonewhois Peon

    Messages:
    177
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Yes. The difference being that it's easy to open a target-less link in a new window, but it's not that easy opening a target="_blank" link in the same window. Therefore you go with one that fits all causes, and the target-less one does.

    At least, that's what the w3c and I think...
     
    someonewhois, Oct 10, 2005 IP
  8. JeremyMiller

    JeremyMiller Guest

    Messages:
    13
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I disagree. It's up to you as the site owner to create the experience you desire. Popping open a window is appropriate in some cases and may cause frustration to your users if you carelessly use the window they're in. For example, when registering for anything, there are often links to incorporated information. This information should popup in a new window so that your user retains the form information they have already filled in. Using the _blank target doesn't prohibit me from opening in a new tab if I choose, but using javascript would. The target attribute is a tool. Use it properly and you'll be enhancing your visitors' experience.
     
    JeremyMiller, Oct 10, 2005 IP
    Smyrl likes this.
  9. jojoyohan

    jojoyohan Peon

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Don't make the users expiriance harder than it needs to be. Don't open a help page from a form in the parent page. At that time you should be using target="_blank".
     
    jojoyohan, Oct 10, 2005 IP
  10. someonewhois

    someonewhois Peon

    Messages:
    177
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Not according to the w3c. There's a reason it's deprecated.

    I don't see how opening new windows and confusing visitors is enhancing anything. The same window keeps the user knowing what's going on. It's only power users who want to control their tabs/windows properly, and they know what's going on.
     
    someonewhois, Oct 10, 2005 IP
  11. jrd1mra

    jrd1mra Peon

    Messages:
    243
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I use target="_blank" for the pdfs on my site and when I have a link that is on my site, maybe my link page or a webite cited in my text, so that is the user gets interested i n what they are reading in a link that points away from my site, when they close the window my site is still there if they forgot.
     
    jrd1mra, Oct 10, 2005 IP
  12. JeremyMiller

    JeremyMiller Guest

    Messages:
    13
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #12
    What I disagree with is the assertion that a window opening is such a horrible thing that it confuses the user.

    As far as your fallacious appeal to authority - the W3C is a recommending organization who happens to be followed by quite a few; however, there are quite a few who disagree. They are by no means the final authority, just one of them. Also, I don't find it necessary to code everything to W3C specifications for maximal usability. Let's face it: If you want maximal usability there are a number of things you simply can't do. I would rather keep in mind my largest appeasible audience for the features I'm coding. There will always be someone using the one browser which doesn't support whatever you're doing. That's life and that's the web.
     
    JeremyMiller, Oct 10, 2005 IP
    minstrel likes this.
  13. mcfox

    mcfox Wind Maker

    Messages:
    7,526
    Likes Received:
    716
    Best Answers:
    0
    Trophy Points:
    360
    #13
    New windows open in DP when the link is external to the site. It's useful.
     
    mcfox, Oct 10, 2005 IP
  14. JamieC

    JamieC Well-Known Member

    Messages:
    226
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    138
    #14
    Hmm, seem to have opened a can of worms here!

    Anyway, the consensus is clearly that yes, the target attribute has been depreciated, and no, there isn't a new version of this.

    That's fine and all I wanted to know :D

    Since everyone's managed to get into a pickle, however, I'd also say that while I can see that opening new windows is not the best option, I have to balance my role as a designer with what the marketing boys want. It's no different to big shops only having escalators on the way up, or supermarkets putting the milk at the far end of the shop.

    For the record, opening new windows is not "inaccessible" in the strictest sense of the word - screen readers such as JAWS have no problems coping with the target attribute, so in terms of accessibility it's perfectly acceptible.

    Interesting discussion though!
     
    JamieC, Oct 10, 2005 IP
  15. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #15
    Frankly, I don't give a damn what W3C decides is deprecated. There are pages on my sites I want opened in a new window. I couldn't care less about whether W3C has a problem with that.

    Do remember that W3C's "pronouncements" are recommendations, not standards.
     
    minstrel, Oct 10, 2005 IP
    Smyrl likes this.
  16. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #16
    Exactly!

    I posted my previous reply before I read yours, Jeremy. Well said!
     
    minstrel, Oct 10, 2005 IP
  17. JamieC

    JamieC Well-Known Member

    Messages:
    226
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    138
    #17
    Quite right too. Although this is one of my MASSIVE pet hates - it seems that Adobe and Microsoft just can't get it right. It doesn't even work in Firefox! I have Acrobat set to open the files entirely independently of the browser - only safe way in my opinion!

    - Jamie
     
    JamieC, Oct 11, 2005 IP
  18. someonewhois

    someonewhois Peon

    Messages:
    177
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Yeah. It drives me nuts. SitePoint implemented links opening in same window months ago and it's been great. Pages I want in new windows I middle click. Pages I want in same window, I click.

    It's your site. If you want purple-pink-red flashing backgrounds with animated babies dancing around on it, it really dosen't matter to me. Same for this. Your site, do as you wish. :)
     
    someonewhois, Oct 11, 2005 IP