Image title and alt tags not displaying


(Jay Pfaffman) #1

I’m in academia and there’s a huge push about accessibility since Harvard and MIT got ADA suits because MOOCs weren’t screen-reader compliant. I’m trying to be a good citizen and include alt tags, but it seems that they are not showing up. They’re in the HTML, though, so I guess screen readers will see them. It makes it hard for me to check, though. I guess this is a simple CSS fix?

I can’t see alt or title tags on this image:

this is an alt tag

On a related note, it would be nice if the <img ...> tags that get created on an upload included something like alt="image description" so that people who don’t know to add that get a little bit of help.


(Jeff Atwood) #2

Er… what? Look at the browser DOM.

<img src="https://meta-s3-cdn.freetls.fastly.net/original/3X/4/f/4faf3120c821aa8e239fe74c8568ca4afaca6433.png" 
width="206" height="44" 
alt="this is an alt tag" 
title="This is the picture title">

In Markdown you do it this way

![Image text goes here](http://commonmark.org/help/images/favicon.png)

Feel free to send links to our Markdown help page, and the 10 minute interactive tutorial is on a big giant button there.


(Jay Pfaffman) #3

Well, I see it now. It didn’t make sense that this could be a problem, but I swear that those weren’t showing up when I posted this.


(Jeff Atwood) #4

Well, there is a slight difference between a reply inserted dynamically in the page in your browser when the reply is composed, and what is rendered to everyone else who reads it (or if you re-enter the topic, or refresh the page etc).


(Franz) #5

The Markdown fragment

![SPPM with RT Direct Lighting](upload://x1828bKPKA0BZDckEtlgeNFwad0.jpeg)

does correctly produce an <img> tag with an alt attribute, however it would be nice if that image title or description would be shown when hovering over the image or clicking on it. Currently it’s not shown anywhere:

(In fact the title I’ve set on this image is not shown anywhere.)

This is with Discourse v2.2.0.beta1 +22.