Why YSK: If you want to make Lemmy a more accessible place for all, you need to know how to add labels (aka: “alt text”) to embedded images

As many of you are already aware, you can embed images in comments using the following markdown: ![](https://example.com/image.jpg).

That works, but the image will be left unlabeled which leaves screenreader users out of the conversation. This may seem like a theoretical problem, but it’s not – Lemmy already has an active blind community: https://rblind.com/

So, here’s what you can do to add labels when embedding images:

![Earth viewed from the Moon](https://example.com/image.jpg)

That’s it! Any text within the [] becomes “alt text”, which is what screenreaders use for describing images. It’s a small thing, but it makes a world of difference.

Remember: Reddit took something from many of us here. For some, it was a mobile app. For others, it was the ability to operate their own communities. Comment with solidarity; use alt-text.

  • raiun@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    Lemmy should do it similar to how I have seen this done on Mastodon. When you upload an image an overlay shows up to remind the user to describe the image before submitting. The typical user is not going to remember to do this.

  • chaorace@lemmy.sdf.orgOP
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    A soldier in the film Starship Troopers speaks directly to the viewer: "I'm doing my part!"

    ![A soldier in the film Starship Troopers speaks directly to the viewer: "I'm doing my part!"](https://i.kym-cdn.com/photos/images/newsfeed/002/182/171/eb0.jpg)

        • CoderKat@lemm.ee
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 year ago

          The text isn’t supposed to show up. It’s alternative text for viewers that can’t see the image (or otherwise need it described).

          In web browsers, you often can long press the see alt or title text, though. As an aside, title text is kinda similar to alt text, but shows up on hover in desktop (on mobile, it’s also long press). It’s not meant for accessibility and not usually friendly for it. It’s usually for supplementary information and not to describe the image. Eg, an acronym might have title text that defines what the acronym stands for.

  • rbhfd@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    Someone called me out on this yesterday. On a thread about rblind, so deservedly so. I had no idea this is how it works though. Thanks!

    • Samuel Proulx@rblind.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      That was me, and my bad. As a blind person myself, I’ve never tried to post an image. I knew including alt text was possible, but I didn’t realize the method was undocumented, and Lemmy doesn’t prompt for it. If I had, I would have offered help, not just snark.

  • Speckle@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    This is really interesting and good to know, thank you for sharing. I’m going to try and remember this for all my images going forward.

    For posts that are image based does the OP need to describe them or is that covered somehow already by screen readers?

    • chaorace@lemmy.sdf.orgOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Excellent question. For image-based posts, there is currently no mechanism to directly embed alt-text. This is likely to change in the future, however, so subscribe to lemmy#1086 for updates.

      For now, the general advice is to use the post body to describe the linked image (on Lemmy, all posts are allowed to have “self-post”-like text). This would work by linking the image directly as usual and also embedding the same image in the post text with alt-text included there.

    • Bongles@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      You can click the little image button when commenting or posting, but it uploads it to the instance you’re on, which costs them space, so it’s probably limited in most instances

        • Bongles@lemm.ee
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          Yes, when I tried it just now it uploaded the picture and put the same text into the comment that you need to link external images ![alt text](link) it just had a link for the newly uploaded photo.

  • explodicle@local106.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    Question for Jerboa users: how do you zoom in on one of these comment images? They’re frequently too small to read.

    • megahertz@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      I’m guessing it is in settings? Also a jerboa user. But I am seeing the comment images at a reasonable size. I’m using the dark theme, and I think I changed the font size, but it’s been almost a month since I first installed, so not super sure.

      • explodicle@local106.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Hmm, I don’t see anything for it in the settings. Some of the pictures are a reasonable size to me, I was thinking like pinch and zoom or something.