Why is target = "_ blank" not recommended with XHTML?

Is it valid in XHTML 1.1 and WCAG 2.0 recommendations do not have information about their use?

I know this is not valid in XHTML 1.0 strictly, but if many people use other things like JavaScript, jQuery, rel attribute, PHP, etc.

Does it make sense? This means that people do not want to follow the verification rules, they just want to skip the verification.

+6
xhtml w3c-validation wcag
source share
3 answers

This mainly concerns the separation of content into behavior. The basic premise is that we must use HTML / XHTML to denote content, CSS for presentation and layout, and JavaScript for interactivity.

The target attribute does not fit into this paradigm (it is a bit of HTML content that affects browser behavior), so its use is not happy.

+6
source share

Why are you trying to make the link open in a new window in the first place? If the user wants to view it in a new window or tab, he must be the one to decide. This is harmful to usability; for example, it ceases to function normally, and takes some control from the hands of users. See this article for more details.

Designers are opening new browser windows for the theory that it is their site. But even ignoring the user's hostile message, implied when taking over the user’s machine, the strategy is selfless, since it disables the back button, which is normal, which return to previous sites. Users often do not notice that a new window has opened, especially if they use a small monitor on which the windows are maximized to fill the screen. Therefore, the user who is trying to return to the origin will be confused by the gray back button.

link

+4
source share

With the exception of 4 special target names, the target attribute is mainly used for frames. Since XHTML 1.0 does not support frames, it makes sense that it does not include an attribute designed to work with them.

It’s sad that this also means losing the “open in new window” effect, but how is it

+2
source share

All Articles