The target attribute and opening new windows
Robert Nyman brings up an interesting discussion about opening new windows, specifically by using the
target attribute, in How evil is the target attribute?.
target attribute is not allowed in strict doctypes, and since you should always use a strict doctype, the
target attribute is invalid. Period. Unless you use frames, which you should not.
My reasoning is that validation is a very useful tool. By deliberately inserting erroneous markup you make that tool harder to use and thus less valuable. Harder to use? Yes, because each time you validate a document you will get validation errors that you need to filter out before you can tell if there are any other, "real" errors.
Most important though: If you, for whatever reason, decide to open a link in a new window, make your users aware of it and if possible give them a choice.
- Previous post: Evaluating website accessibility part 3, Digging Deeper
- Next post: Always specify character encoding