There’ve been a few questions about how to make underlined text more accessible (one of which was mine), and it made me wonder if you could just add an alt tag to text to get screen readers to read something before or after a certain span of text (e.g., “the phrase ‘Brian [comma], Gemma [comma], and me’ is underlined.”) Answer: no, you can’t do this. But why not?
It would be so much more efficient than having to create a bunch of images. Is there a reason that the alt attribute has been set up such that it can’t be applied to graphic text? Is changing it at this point even possible?
August 31, 2023 at 7:13 pm
Wouldn’t a title work? I have seen it used with abbreviations and links… click here <abbr title="New York City">NYC</abbr>
September 1, 2023 at 10:33 am
BTK! Thank you—you’re always giving me such handy tips. I’ll give this a try.
Can I ask who you are / what press you’re at?
September 1, 2023 at 12:30 pm
I would caution against using the abbr element with the title attribute (especially for text that is not an abbreviation since that might mislead the reader). According to DAISY Knowledge Base:
“A drawback of using the abbr element is that the expansion may only be available to users of assistive technologies. Although using the title attribute will produce a tooltip when a mouse is hovered over the abbreviation, readers may not be using a reading system with a pointing device.”
For AT users, the repetition of the text in the title attribute followed by the text content it elaborates on might hinder the reading experience.