Skip Navigation

Search

Allow for true alt text to be specified in markdown

codeberg.org Allow for true alt text to be specified in markdown

See [this post](https://kbin.social/m/ArtemisAppPlayground/t/467262/Testing-alt-text) 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 i...

Allow for true alt text to be specified in markdown

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. > >

4