While it is recommended to use the title
attribute on the <abbr />
element, this has no effect on screen readers (at least not on chromevox).
<abbr title="as soon as possible">ASAP</abbr>
The thing that works is of course aria-label
e.g:
<abbr aria-label="as soon as possible">ASAP</abbr>
So in order to be both semantically corrent and screen reader compatible I need to mark both:
<abbr aria-label="as soon as possible" title="as soon as possible">ASAP</abbr>
which seems a bit of a hack. why doesn't chromevox just read the title attribute instead?
aria-label should be used in conjunction with the title attribute. Aria for screen readers, and title attribute for other people who want more information about the action of the button.
The <abbr> tag defines an abbreviation or an acronym, like "HTML", "CSS", "Mr.", "Dr.", "ASAP", "ATM". Tip: Use the global title attribute to show the description for the abbreviation/acronym when you mouse over the element.
The aria-label attribute is intended for interactive elements only. Use aria-label to ensure an accessible name is provided when none is visible in the DOM for all interactive elements, like links, videos, form controls, landmark roles, and widget roles.
The <abbr> HTML element represents an abbreviation or acronym. When including an abbreviation or acronym, provide a full expansion of the term in plain text on first use, along with the <abbr> to mark up the abbreviation. This informs the user what the abbreviation or acronym means.
I'm sorry to add another totally different answer but I think both answers should not be merged:
As ChromeVox is opensource, I have a second and now technical answer to your question. http://src.chromium.org/svn/trunk/src/chrome/browser/resources/chromeos/chromevox/common/dom_util.js
For any element (and there is no exception for abbreviations) ChromeVox fallbacks to the title
attribute if there is no text content in the node (node.textContent.length==0
)
Here is the order of precedence defined in the code:
Now, it's kind of a buggy situation
<abbr title="British Broadcasting Corporation">BBC</abbr>
<abbr title="British Broadcasting Corporation"></abbr>
<abbr title="British Broadcasting Corporation"> </abbr>
If we except the last bug, it is not a perfect but quite consistent implementation of Text Alternative Computation
- [F. Otherwise, look in the subtree]
- G. Otherwise, if the current node is a Text node, return its textual contents.
- H. Otherwise, if the current node has a tooltip attribute, return its value.
Note that according to the document referenced in one comment above, the title attribute, if present, should now be used by accessibility api instead of the text content: (http://rawgit.com/w3c/aria/master/html-aam/html-aam.html#text-level-elements-not-listed-elsewhere). I'm not sure it's a good thing as the title
attribute was previously and is still defined as the following by the W3.
The title attribute represents advisory information for the element, such as would be appropriate for a tooltip
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With