[whatwg] Target Attribute Values

Ian Hickson wrote:
> On Thu, 26 Apr 2007, Spartanicus wrote:
>> As a user I detest new windows opening without having chosen to do 
>> that myself. But I'd question the wisdom of making _blank non 
>> conforming.
>> 
>> 1) At least _blank allows me to filter it out before sending it to 
>> my browser.

Filtering out the value _blank is an ineffective way of blocking popups. 
  Some browsers have prefs to control it.

e.g. in Firefox, setting the pref browser.link.open_newwindow to 1 
causes any links with target="" that would normally open a new window, 
to open in the current tab.  There are a few other prefs to control 
window.open() as well.

>> 2) Afaik currently any attribute value for the target attribute 
>> which hasn't been defined opens a new window. If _blank were made 
>> non conforming authors would imo resort to using non defined names 
>> which has the same result in practice, but which makes filtering 
>> such methods out on the user end much harder.

In practice, authors use a wide variety of values to get popups anyway. 
  "_new", "newwindow", "popup", etc. are all fairly commonly used, among 
many others.

>> I've argued my socks off trying to convince authors that they 
>> should leave opening new windows to users, but there are an awful 
>> lot of them who for various reasons insists on doing just that.
> 
> It would be interesting to hear the needs of these authors. Can 
> anyone elaborate? We might well need to re-allow it in the end, I'm 
> curious to hear why people use it.

The major reasons for popups that I can remember include:

* Links to external sites, so that users don't leave the previous site.
   - It's far better to inform the user that they're going to an external
     site and let them decide for themselves if they want a new window.

* Opening help windows. e.g. for help with forms.
   - There are much more user friendly ways of offering help to users
     without popups.

* Photo galleries, where clicking on the thumbnail opens the larger
   version in a popup.
   - There are much more user friendly alternatives that don't require
     popups.  (Just imagine how hard Flickr would be to use if they
     opened popups for every photo!)

* Links to files that require external apps, which commonly open within
   the browser. e.g. PDF, Word docs, etc.
   - Jakob Nielsen promotes this one for flawed usability reasons, but
     whether or not such a file opens within the browser is entirely
     dependent upon the UA config.

* Advertisements
   - These are just annoying.

* To give users windows without chrome (using window.open()), sometimes
   to prevent the use of the back button.
   - Such uses usually indicate broken back end implementations and/or
     the complete failure to think about usability.

> On Apr 27, 2007, at 8:49 PM, Ian Hickson wrote:
> 
>> On Thu, 26 Apr 2007, Lachlan Hunt wrote:
>>> 
>>> Why is _blank still considered a conforming value?  On IRC, Hixie 
>>> mentioned that there are some legitimate use cases, but didn't 
>>> list any. I've argued against popups many times before and heard 
>>> many arguments for them, but I'm yet to hear of any legitimate 
>>> use cases.  If there are any, what are they?
>> 
>> I've removed _blank from the list of valid values.
> 
> Won't this just lead authors (who care about conformance) to use 
> window.open(), with equally bad results that it's harder for the UA 
> to control? This move seems to be taking the opposite of the logic 
> behind the ping attribute.

Yes, unfortunately.  We have already seen that occur with authors using 
HTML 4.01 Strict.  target="_blank" is less evil than window.open(), so 
it may indeed be more pragmatic just to concede that authors are going 
to use popups in one way or another, and just allow it.

Sigh. :-(

> One valid reason to use _blank instead of a named target to open a 
> new window is the fact that the top-level frame namespace is global, 
> and you don't want to collide with windows opened by other web apps, 
> or even other instances of your own web app.

You're assuming there is actually a valid use case for the popup in the 
first place.

-- 
Lachlan Hunt
http://lachy.id.au/

Received on Friday, 27 April 2007 21:55:30 UTC