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: See your markup in context with X-Ray
Subscribe / follow
- Front End Designer & Developer at iGovern.com (Anywhere within the USA, , US)
- Front-End Developer - Help Us Revolutionize Enterprise IT at MarkITx (Chicago, IL, Il, US)
- iOS Developer at Etsy (Brooklyn, NY, US)
- Programmer / Software Developer / Back-end Developer at Caxiam Group (Orlando, FL, Fl, US)
DreamHost web hosting
Use the promo code 456BEREASTREET3 to save USD 20 when you sign up for DreamHost