jaz303/tipsy — pull request #159 by patrickhlauke (2013-07-06 23:20:49+00:00)
Title: Accessibility improvements (keyboard and screenreader users)

By default, tipsy will now hook into BOTH mouseenter/mouseleave AND
focus/blur. This makes tooltips work for sighted keyboard users out of
the box as well. The new default for trigger is now 'interactive', which
covers these two cases. 'focus' can still be used to limit tooltips just
to focus/blur.

Tooltips now get an id attribute, and - using WAI ARIA role and
aria-describedby - are given the correct role and programmatically
associated with the element they refer to, meaning assistive
technologies such as screenreaders should announce the tooltip text as
an additional description/hint (as they would in most cases with regular
title attributes).

As an extra, the plugin now also forces elements that it is applied to
into the tab cycle by adding tabindex=0 (if no tabindex is present
beforehand). This way, if tipsy is applied to elements that
traditionally don't receive keyboard focus (div or span, for instance),
this plugin will also automagically make them keyboard accessible.

Lastly, used data-title rather than original-title, to make it a bit
more in line with new HTML5 style data attributes style.