Remix.run Logo
graemep 12 hours ago

I find it very hard to know what to do to follow best practice. For example the biggest UK charity for blind people make social media posts about the importance of text descriptions and alt tags that break what I thought was good practice (they duplicate text in post and alt tag) and they seem to encourage this.

shakna 11 hours ago | parent [-]

I don't recall where, but I've heard that before in the past. Perhaps in the kind of slop that makes the rounds on LinkedIn.

There is sort of a good reason for it, in the past. Before the overhaul, Microsoft Speech used to skip Facebook posts, and read the alt text instead. It is now, however, more sane. Facebook was pretty darn bad at accessibility in its early days. A lot of intermingled broken spans for text, causing stuttering and other issues.

However, today, most reading systems prefer the "title" attribute, to the "alt" one. If title exists, it'll read that and skip alt. Some always skip alt, regardless of it exists or not.

Figure and figcaption are about the only way to get good and consistent behaviour, but you don't really control how those happen on most social media platforms. You throw everything you can at the wall, and see what happens. And it might change tomorrow.

Today, I'd say the above is bad advice. An image description is a good practice. Repeating yourself, isn't.

graemep 9 hours ago | parent | next [-]

Thank you, that is quite informative.

The specific posts I see are from the Royal National Institute of Blind People who really ought to know.

What they do is add the image description at the end of each text post, even thought this matches the alt text.

This is the one about using alt text: https://www.facebook.com/rnibuk/posts/pfbid037RmtoSxfAJX82G4...

They do now have a comment on that one that explains their reasoning (I did not see it until just now).

zersiax 10 hours ago | parent | prev [-]

Wait the title attribute?

What are you basing that on? Screen readers tend to not pick those up at least on interactive elements by default, you need to do a bit of "wiggling" to get those to be announced. Disclaimer: screen reader user

shakna 10 hours ago | parent [-]

JAWS user, here. It will read both aria-label and title, on a button, which is an interactive element. [0]

It does depend on the verbosity, if you dial that down, you'll probably lose the title element. But for images, which is what I was mentioning, it should pretty much always be read out.

[0] https://github.com/FreedomScientific/standards-support/issue...

zersiax 10 hours ago | parent [-]

I am ... relatively sure JAWS reads out title attributes of images because people kept erroneously sticking important info there decades ago, I wouldn't say that's a generally accepted recommendation. Not entirely sure what NVDA would do with an image that has only a title but no alt set.

shakna 9 hours ago | parent [-]

ARIA and the web group define title to be used. [0][1] It's just that many agents just don't use it correctly. JAWS and NVDA do. Microsoft Speech used to ignore it, but I think they fixed that around Windows 11 release. I'm not sure about VoiceOver. Most braille readers I've used... Well, you'll be lucky if they read anything correctly.

With the three big ones, JAWS, NVDA and Speech using it correctly, I'm pretty happy guiding people to use it today.

> The title attribute represents advisory information for the element, such as would be appropriate for a tooltip. On a link, this could be the title or a description of the target resource; on an image, it could be the image credit or a description of the image; on a paragraph, it could be a footnote or commentary on the text; on a citation, it could be further information about the source; on interactive content, it could be a label for, or instructions for, use of the element; and so forth. The value is text.

[0] https://html.spec.whatwg.org/multipage/dom.html#the-title-at...

> Most host languages provide an attribute that could be used to name the element (e.g., the title attribute in HTML), yet this could present a browser tooltip. In the cases where DOM content or a tooltip is undesirable, authors MAY set the accessible name of the element using aria-label, if the element does not prohibit use of the attribute.

[1] https://w3c.github.io/aria/#aria-label

[2] NVDA bug confirming they use it: https://github.com/nvaccess/nvda/issues/7841

[3] Sorry for the numbers everywhere. I've got a footnote macro set for the way most HNers use this.