hello friends of rblind. I am a sighted person who follows the kbin-core repo. I saw an issue #1143 opened recently regarding the use of alt in markdown. I am having a hard time discerning whether it is a productive request or not.

I understand that rblind is not a free-of-charge accessibility consultation company. But I thought I would point out this issue in case anyone had an interest in contributing to the discussion.

If I am posting in error, please either remove it or notify me so I can remove or edit the post.

Here is the text of the issue:

See this post

Current widespread wisdom is that you should specify alt text with the format ![alt text](url) but this ISN’T behaving as alt text. It’s behaving as a label. It needs to be set to the alt text attribute on the image.

True alt text doesn’t need to be rendered out. It’s a nice feature that apps like pixelfed give you a button to see the alt text, because it can give extra context, but this is a secondary feature. This would be great to add as well, but it’s out of scope here.

Labels are meant for things like crediting the photographer. See any well written news articles for examples of this. This one has an image of some sharks as a header. You’ll see underneath that it has an explanation and credits NIWA for the image.

There IS a way to specify labels in markdown, and leave the alt text in tact. The correct format is ![alt text](link "label goes here") but this isn’t currently recognised by kbin and the label gets completely stripped out. (link)

You can verify this by using something like this plugin.

Notice how all the post images are marked as “Missing alt attribute”

Notice how things like the magazine icon don’t render out their alt text “ArtemisAppPlayground Icon”

Further, see codberg’s handling of images:

alt text

![alt text](https://upload.wikimedia.org/wikipedia/commons/thumb/6/66/SMPTE_Color_Bars.svg/320px-SMPTE_Color_Bars.svg.png "Label text here")

results in the following html:
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/66/SMPTE_Color_Bars.svg/320px-SMPTE_Color_Bars.svg.png" alt="alt text" title="Label text here">

(codeberg displays labels as tooltips)

I honestly think it’s fine to keep using the first [part] as labels, mostly because this syntax is already widely in use, but I think the second (link "this bit") should be set to the image’s alt text attribute.

  • Kraiden@kbin.social
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    Lol, honestly I’m already deeper down this rabbit hole than I ever thought I’d be.

    So far as I can tell, Kbin doesn’t provide a way to specify alt text on embedded images at all. You can attach an image to the post using the GUI, and specify alt text that way, but it will always be at the end of the post, and you can only have 1. Not ideal.

    Re: Syntax support. There’s no official spec for markdown, but there is a canonical syntax guide which describes the format I’m suggesting. You’re correct that it’s not very widely supported in implementation though.

    I think I created confusion on that ticket by talking about the codeberg.org implementation, which does support the suggested syntax, by populating the title attribute. I wasn’t necessarily suggesting it as a solution, and it sounds like that’s not a great implementation anyway.

    I created even more confusion by talking about a plugin that sighted devs or testers could use to see alt text, and gave a few examples of elements to look at. None of that is really relevant.

    I did try to clarify as a comment on the parent post here if you’re interested.

    • MostlyBlindGamer@rblind.comM
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      Right, text between brackets should really go into the ‘alt’ attribute. If we boil this down to that, it’s a good clear place to start.