As you may know, the Twitter bootstrap tooltips are not accessible (I.E. they are not being read by screen readers). To make that happen, the following things should be done:
- Upon calling the
tooltip()
function, the generated text element (the one that contains the text of the tooltip) should get a new attribute added to it:aria-hidden="true"
. - The original element (the one
tooltip()
has been called on) should get an attribute added to it:aria-describedby="#<tooltip-id>"
, where tooltip-id refers to the id of the new element that was just created above.
Since the way the Javascript currently works is selecting all the elements with the .tooltip
class and applying the tooltip()
function to it, I'm wondering how I can do this without modifying the source code of the tooltip()
function.
Here is an example of the code for a button:
<span role="button" rel="tooltip" title="Add Youtube Video" class="fancyPostButton span1" tabindex="0" style="-webkit-user-select: none;padding-top: 10px">
<div id="fancyPostVideoPicker" class="fancyPostAttachment videoAttachment glyphicons film centerMe">
<i></i>
</div>
</span>