~bouncepaw/mycomarkup#18: 
Add support for alt-text

One of the things vital for accessibility is alt text — a description that is read by screen readers. Mycomarkup should have it.

Note that image descriptions which are already supported by mycomarkup are different from alt text, since they are shown by default. Image descriptions are usually not that helpful for sighted people, since they can just see the picture, instead of reading its description.

Not sure what is handled by this repository and what is handled by the users, but the ideal state of alt text support is:

  • You can specify alt text for an image in mycomarkup
  • Alt text is added as the alt html attribute (or in any other way depending on the medium)
  • Alt text is not shown visually, but you can see it as a popup if you press a button (i.e. ideally alt text adds an [alt] button to the image)
    • This is needed because sometimes sighted people can benefit from the picture description, specifically in cases where it's not clear from the image what it shows
    • Here is an example of how that can look: image showing alt button being pressed on twitter
Status
REPORTED
Submitter
~wffl
Assigned to
No-one
Submitted
1 year, 2 months ago
Updated
1 year, 2 months ago
Labels
No labels applied.

~bouncepaw 1 year, 2 months ago

Yes, absolutely! I thought about the following syntax before:

img grid { https://bouncepaw.com/mushroom.jpg { Some description here } The alt-text is here until the end of line

https://bouncepaw.com/mushroom.jpg { That's a different picture with no alt-text } }

Not sure how viable it is though.

~wffl 1 year, 2 months ago

I think alt-text oftentimes gets somewhat long, so limiting it to only a single line doesn't sound right.

~bouncepaw 1 year, 2 months ago

Hmm, yeah, that's right.

In Mycomarkup, {} is often used for multi-line content. For example, multiline table cells:

table {
  | one line | {
     multi
     line
  }
}

img {} already used that for image captions. But what if we use {} twice?:

img {
   waffle photo {
      I did this waffle yesterday.
   } {
      A photo of a Vienna waffle with some strawberry jam on it.

      The photo is very detailed.
   }
}

No caption and an alt text:

img {
   waffle photo {} {
      A photo of a Vienna waffle with some strawberry jam on it.

      The photo is very detailed.
   }
}

~wffl 1 year, 2 months ago

This is an option, yes. Kind of reminds me of LaTeX :sweat_smile:

It does look a bit weird, but I don't think we can come up with a much nicer scheme.

Register here or Log in to comment, or comment via email.