Apparently [code]target=_"blank"[/code] is no longer acceptable using the XHTML 1.0 Strict doctype. Anyone know the correct way to get a link to open a new window?
[editline]10:15AM[/editline]
I just found this:
[quote=something on w3.org]> One more question: Validator doesn't allow the "target" attribute of
> an anchor tag in strict HTML 4.01; while not deprecated, it's
> considered "loose DTD", and is therefore unacceptable.
> Therefore how, in Strict HTML 4.01, do you target a link to a new
> window?
The short answer is: you don't.
The long answer is that targeting a link to open in a new window
violates the Web Content Accessibility Guidelines [1], and (if you're in
the United States or other country with comparable antidiscrimination
legislation) is quite possibly illegal under federal civil rights law.
Radical changes of focus in a GUI environment are extremely disorienting
to blind users who are navigating by screen reader, and thus can be
considered discrimination against the visually impaired. Opening a link
in a new window also breaks the `back' button on the browser, preventing
back-tracking in navigation. (It also bypasses the tabbed navigation in
Galeon and Mozilla, irritating users of that feature.)
If your user wants to open the link in a new window, he or she can do so
quite easily with most browsers; there is no need to force the issue.
It's about leaving the user the freedom to navigate in the way that
works best for him or her.
It's not unusual for a designer never to have thought about such issues;
that's why we have the WCAG to point out to us things we might otherwise
overlook.
[/quote]
Bad move W3C, bad move.
Not really, I always use the middle click open in new tab shortcut anyway. Consistent behavior is much better than annoying web designers telling me what I want to do with their links.
[QUOTE=birkett;17580819]Bad move W3C, bad move.[/QUOTE]
Eh.
If I want something in a new window I do it myself. Othewise it's just annoying.
Because valid code means more than functionality...
If you have a good reason to make a new window, just do it. Browsers are still going to support it forever anyways.
If validation is sooo important to you, use javascript to pop up a modal window or something.
Uh, wtf... Illegal to open a link in a new window?
Click the mousewheel...
target=_"blank" -> target="_blank"
Also:
Opening up new browser windows is like a vacuum cleaner sales person who starts a visit by emptying an ash tray on the customer’s carpet. Don’t pollute my screen with any more windows, thanks […] If I want a new window, I will open it myself!
[QUOTE=jivemasta;17581285]
If you have a good reason to make a new window[/QUOTE]
Name one.
There's none appart from using JavaScript. You gotta let the user choose.
Does target="_new" do the same thing as target="_blank"? Because I always use _new... as far as I know, browsers deal with it differently; opening stuff in new tabs rather than new windows...
I don't see what the problem with them is. "It messes with navigation"... What? If you just want to direct them to a site temporarily but leave your page open in the background (portfolio pages), it's perfect. "Discriminatory to the blind"... so there's no screen-reading software which can deal with new pages, whatsoever?
It keeps people on your site, that's the only reason to use it.
[QUOTE=Catdaemon;17582431]Name one.[/QUOTE]
It's a programmer's perspective type of thing. Like I'd rather have a image gallery open an image in a new modal window than have it open a lightbox, or in the same window. That way the user can keep the image open, and still open other pictures without having to hit back or close a lightbox. Sure, they could middle click and have it in a new tab, but not every user knows about that.
html5 != xhtml strict. Use xhtml transitional or html4. xhtml is shit anyway, hence their decision to drop xhtml2 in favor of html5. Since html5 has yet to arrive, I've no idea if blank will be supported, but it probably will be.
Anyway, fuck validation, it literally means fuck all 99.9% of the time.
Modal windows can go die.
[QUOTE=blankthemuffin;17596782]Modal windows can go die.[/QUOTE]
Because lightboxes and javascript in-page popups are better.
[QUOTE=jivemasta;17598054]Because lightboxes and javascript in-page popups are better.[/QUOTE]
yes they are, I'm glad we agree
Use _blank and xhtml transitional. Valid, and doesn't rely on javascript. Win win.
[QUOTE=Catdaemon;17598721]yes they are, I'm glad we agree[/QUOTE]
Yes, let's make everything else in the page blurry, and unclickable until the user looks around for where you decided to put the close button. Instead of having a regular os window pop up where the close button is where the user would normally look for it, and the can minimize it or do whatever they want with it.
A popup window offers more control for the user. A javacript in-page popup stops them from doing what they want. They can't do anything else in the page until they deal with what you put up there.
[quote]
The long answer is that targeting a link to open in a new window
violates the Web Content Accessibility Guidelines [1], and (if you're in
the United States or other country with comparable antidiscrimination
legislation) is quite possibly illegal under federal civil rights law.
[/quote]
Illegal to open a new window? That's ridiculous.
[QUOTE='-[ Fizzadar ]-;17589683']html5 != xhtml strict. Use xhtml transitional or html4. xhtml is shit anyway, hence their decision to drop xhtml2 in favor of html5. Since html5 has yet to arrive, I've no idea if blank will be supported, but it probably will be.
...[/QUOTE]
XHTML2 was dropped, but XHTML as a whole wasn't, HTML5 has an XHTML profile and a lot of the XHTML stuff has been pushed into HTML5 normally (even in HTML mode, HTML elements live in the XHTML namespace)
And it looks like target="_blank" is in HTML5 (It's in the current draft anyway)
As far as opening new windows, no one has considered that maybe the user is doing something that can't be interrupted by going to a new page, like a multi-page survey or signup.
Popup windows are not a big deal as long as the user knows that it will be a popup beforehand.
Sorry, you need to Log In to post a reply to this thread.