4

We use a workaround where we use an image inside a keyboard tag Windows Logo Key to depict things like the windows key in superuser. We recently got a post on meta.su from a visually impaired user who's requesting the use of alt-text for that sort of thing, since his screenreader dosen't pick it up. Is this possible within the realm of markdown? Can we have this as a feature if its not already in place? Shouldn't be too hard to fix existing questions if its doable, and would help loads with accessibility

3
  • 1
    I'm seeing <kbd><img alt="Windows Logo Key" src="http://i.stack.imgur.com/GIQBX.png"></kbd> in the source of this very question, so... it looks like alt text is already working just fine. If his screen reader doesn't pick up on said alt text, that's not an SE issue. May 22 '14 at 1:18
  • Thats interesting. I'm not seeing alt-text on hover as I usually do.
    – Journeyman Geek Mod
    May 22 '14 at 1:19
  • 4
    @JourneymanGeek Alt-text does not appear on hover. It appears in place of an image when the image cannot load. The title appears on hover.
    – animuson StaffMod
    May 22 '14 at 1:21
3

Yes. It's possible. In fact, you did it right in your question. See:

<kbd>![Windows Logo Key][2]</kbd>
       ^^^ ALT TEXT ^^^

  [2]: http://i.stack.imgur.com/GIQBX.png

Renders as:

<kbd>
    <img src="http://i.stack.imgur.com/GIQBX.png" alt="Windows Logo Key" title="">
</kbd>

You can even add a title (tooltip text) by doing something like this:

  [2]: http://i.stack.imgur.com/GIQBX.png "Windows Logo Key"
                                           ^^^   TITLE  ^^^
5
  • Forgive the edit, but I wanted to relate a specific example of a reader (SE's official iOS app) that works with the alt text as posted here currently.
    – bmike
    May 22 '14 at 1:30
  • @bmike Sounds like something worth a comment or an edit to the question, not an edit to the answer that blew up some of the formatting on it. May 22 '14 at 1:33
  • 2
    I am the user that asked about this on Super User. The examples provided in this answer work with my screen reader. The only place it apparently didn't work was in the answers of this question before they were edited to fix it. So I assumed they didn't work anywhere else. Apparently, I was wrong.
    – fastfinge
    May 22 '14 at 1:41
  • on further talking with the user, apparently the example I had copypasted was fixed by another mod. Slightly embarassing, but I guess its a non issue.
    – Journeyman Geek Mod
    May 22 '14 at 1:43
  • @fastfinge HTML doesn't work in comments. You'll need to use markdown links instead. May 22 '14 at 2:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .