WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Title attributes on images and links

for

From: Karl Groves
Date: Aug 5, 2009 12:00PM


> From: <EMAIL REMOVED> [mailto:webaim-forum-
> <EMAIL REMOVED> ] On Behalf Of Dean Hamack
> Sent: Wednesday, August 05, 2009 1:43 PM
> To: WebAIM Discussion List
> Subject: Re: [WebAIM] Title attributes on images and links
>
> Hi Karl, responses to your points inline
>
> On 8/5/09 9:52 AM, "Karl Groves" < <EMAIL REMOVED> > wrote:
>
> > In frustration, they begin closing the browser. Now, what you might
> > expect is that they'd close this "new" window and realize along the
> way
> > that your original site is there underneath in the "original" window.
> > What actually happened, surprisingly, is that they somehow got to
> thinking
> > that the only way they could get back to your site was to start over
> > entirely from the beginning - shutting down all browser windows
> entirely
> > and starting anew.
> >
> > The bottom line: Opening new windows via 'target' causes lost,
> frustrated
> > users. Frustrating users is really bad business.
>
> Which is exactly what happens to me when I open a pdf in the same
> window.
> Can't please all of the people all of the time I guess.

This isn't' an 'either-or' thing. I agree with you on the PDF thing.
In such a case, you could forcibly set the 'Content-Disposition' header to
be 'attachment', which will prompt the user with what to do with the file
(i.e. whether or not to open it in Adobe Reader. Again, I have no info
on what users' reactions would be to this approach, but may meet your
needs.


>
> > I haven't worked out a solution, but one previous co-worker
> hypothesized
> > that we could avoid this problem by purposely making the new window
> > significantly smaller (something like 60% of full window size) via
> > JavaScript.
>
> Yep. In fact, that is the only way to open new windows and still have
> your
> site validate as XHTML strict. In their infinite wisdom, the w3c
> decided to
> deprecate the target attribute and force developers to use javascript
> to do
> this very simple task.

That's OK. You'll have all new frustrations when HTML 5 comes out! ;-)

Besides, target wasn't removed from XHTML 1.1
http://www.w3.org/MarkUp/2004/xhtml-faq#target

As always, if there's an element or attribute you wish to use which
doesn't exist or is deprecated, then declare a different DTD and conform
to that.

Most people get XHTML wrong anyway: http://hixie.ch/advocacy/xhtml


>
> I generally use a little icon to indicate that a link will be opened in
> a
> new window (like the little arrows on wikipedia). I also use a title
> attribute that says "open this link in a new window". But as was
> mentioned
> earlier, this doesn't help the screenreader user much.

Well, if you're using an icon, then the alt attribute would work just
fine. Make sure the icon is within the link though:
<a href="http://www.example.com">Go <img src="foo.gif" alt="Opens in a new
window"></a>


Karl