4

I've been tasked with making sure a site my company has built meets WCAG 2 AA. I generally write accessible code, and running automated validators usually only highlights typos. I have recently switched validator however, and the new one is highlighting that many of my links don't include title attributes. In the past I have only used the title attribute on links when the link text wasn't entirely self-explanatory by itself.

2 questions:

  1. Is my past behaviour correct, or should I be using title attributes by default (like alt attributes on images)?
  2. How important are title attributes for accessibility really? A google around found that they may not even be used by some screen readers.
chrism
  • 2,905
  • 8
  • 37
  • 40
  • 1
    The title attribute is not critical to accessibility, but it may provide useful information that can't otherwise be expressed in the content of an element itself. – BoltClock Nov 14 '12 at 16:22
  • 1
    Related question with my answer: http://stackoverflow.com/questions/11161915/simple-tooltip-title-attribute/11163133#11163133 – Ryan B Nov 14 '12 at 16:46

2 Answers2

7

According to Webaim

The title attribute, by definition, can be used to provide advisory information. It should:

  • NOT provide vital information or information necessary for accessibility.
  • NOT provide the same information as is available in text or alternative text.
  • NOT present the obvious. If the advisory title does not provide additional, useful information, it can be removed.
  • BE used carefully on small links and navigation items because the title tooltip may cover the underlying item.
  • NOT be used as a replacement for alternative text, form labels, table headers, etc.
  • ALWAYS be used on the frame element

So essentially you've been on the right path. Being more aware of whether or not it is truly accessible is more important than making sure it passes all automatic validators

gotohales
  • 3,665
  • 1
  • 20
  • 34
  • I agree with you last sentence, but unfortunately part of the contract is ticking those boxes. In fact the problem was only a warning and didn't inhibit WCAG AA validity, I mainly ask because I was curious – chrism Nov 14 '12 at 16:35
  • I am definitely familiar with that. Government and some higher education clients require those checklists, despite how outdated a lot of the matieral is. I have been doing a lot of research lately on the topic and found resources like Webaim extremely helpful. They also answer emails directly quite often if you desire further input! – gotohales Nov 14 '12 at 16:40
  • Highly recommend reading [this article on issues on using TITLE](http://www.paciellogroup.com/blog/2010/11/using-the-html-title-attribute/), and especially [this article on correct usage](http://www.paciellogroup.com/blog/2010/11/using-the-html-title-attribute/) that it links to. Unfortunately, some accessibility 'validator' tools are somewhat simple minded, and if you followed their advice literally, you'd end up with inaccessible pages. TITLE has issues, and is often best *avoided* on links; see above page for more details. – BrendanMcK Nov 15 '12 at 11:54
  • @BrendanMcK Both those links point to the same article. Did you mean to post two different articles or the same one twice? – gotohales Nov 15 '12 at 14:26
  • @mookamafoob - agh, cut'n'paste with multiple tabs got the better of me - [this is the first article](http://www.paciellogroup.com/blog/2012/01/html5-accessibility-chops-title-attribute-use-and-abuse/) which is an update on TITLE in HTML5. It basically says more of the same, and then defers to the original 2010 article that I linked to twice because it's the important one :) – BrendanMcK Nov 15 '12 at 20:10
0

Title attributes should be used for supplementary descriptive information when a link's content is not overly intuitive. It appears that your previous use is acceptable.

RhinoWalrus
  • 3,009
  • 2
  • 32
  • 41