Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No alt text on images #288

Closed
becka11y opened this issue Feb 21, 2020 · 14 comments
Closed

No alt text on images #288

becka11y opened this issue Feb 21, 2020 · 14 comments

Comments

@becka11y
Copy link

I expected that the information I was adding into an image was being implemented as alt text. Alas, it is not. The information is being added as the title attribute - this is incorrect! The title attribute only helps mouse users. Any description of the image should be added onto the <img> element in the alt attribute. This is a serious accessibility issue.

There should also be a way to indicate that the image is decorative and does not need a description. If I enter then an empty alt attribute should be inserted. This can be accomplished via <img src="thesource" alt> or &ltimg src="thesource" alt="">

This is a serious accessibility issue.

@gitpitch
Copy link
Owner

Hi Becky, I've finally looked into this and implemented a patch that allows you to activate alt text on images. The solution basically promotes title text into the alt property on any image. For example:

![BIG PICTURE](assets/img/picture.png)

This syntax results in an image with "BIG PICTURE" activated as both title and alt on the image.

![title=BIG PICTURE](assets/img/picture.png)

This syntax is identical as it results in an image with "BIG PICTURE" activated as both title and alt on the image.

![title=BIG PICTURE, shadow](assets/img/picture.png)

This syntax results in an image with "BIG PICTURE" activated as both title and alt on the image. It also activate the shadow custom CSS style rule on the image. You can read more about compound properties on images in the Pro Inline Images Guide.

To try this out you will need to download the latest version of the Desktop. When you have a chance please test it out and let me now how it goes. Thanks, David.

@becka11y
Copy link
Author

becka11y commented Apr 24, 2020 via email

@gitpitch
Copy link
Owner

Some further clarification to address the secondary issue you raised re. how to indicate that the image is decorative and does not need a description . This now happen automatically when title text is omitted, for example:

![](assets/img/picture.png)

The rendered image tag will have an empty alt property. I believe this will give you what you need but you can let me know once you test. And one final note, this support is also live on gitpitch.com.

@becka11y
Copy link
Author

becka11y commented Apr 27, 2020 via email

@gitpitch
Copy link
Owner

Thanks for testing and for the additional feedback. You have reminded me that the title text using the ![title-alt text](xxx) syntax can now end up with the text within the class property since I introduced Pro Image Manipulation. Something I will look into.

But for now you can either ignore the underlying dirty generated HTML snippet which should still work or you can use the alternative and cleaner ![title=title-alt text](xxx) syntax.

@becka11y
Copy link
Author

becka11y commented Apr 28, 2020 via email

@gitpitch
Copy link
Owner

Thanks for the additional clarification Becky. I live and learn. Sometimes slowly :)

So, to be really comprehensive the user should be able to enter both.

I think if we are going to do this we should do it right. So I plan to add support for alt text. As distinct to title text as you pointed out. Once I have something for you to test I will let you know. Thanks again. David.

@gitpitch
Copy link
Owner

A new patch is now live that introduces explicit support for the alt attribute on images. This support extends but is independent of pre-existing image manipulation properties including the title property.

  1. To activate alt text on an image use the alt= property on your image markdown as follows:
![alt=Your custom alt text](path/to/file.png)
  1. If the alt property is not explicitly set then the alt attribute is disabled on the corresponding image tag as follows <img src="xxx" alt />.

  2. This new property can be used in conjunction with any of the existing properties, for example:

![width=400, alt=Cloud deployment architecture diagram](path/to/file.svg)

This patch is now available in the latest release of the Desktop. And live in the cloud on gitpitch.com. When your time permits can you please test and let me know how it goes. Thanks, David.

@becka11y
Copy link
Author

becka11y commented May 1, 2020 via email

@gitpitch
Copy link
Owner

gitpitch commented May 1, 2020

I just came up with another scenario. What if I want no alt and no title?

No alt and no title is the default, so you could:

![](path/to/image.png)

They property syntax you used ![alt title](path) is not valid. But you could use valid property syntax if you wanted to be explicit:

![alt=, title=](path/to/image.png)

Both these these approaches should result in the following:

<img src=“url" title alt>

Which I believe is what you are after. Is that right?

And, on another point, I personally would prefer that the default, with no attrib name specification would be to input an alt rather than a title attribute. Although, I realize that presents some backward compatibility issues.

That would present some (probably minor) backwards compatibility issues. But I'll consider it and update you here if I make that change.

Just getting people to add the description is difficult enough, now they have to actually understand that they are explicitly adding alt text AND a title. My images right now all look like: ![alt=description text title] so that I just get alt and no title.

I actually thought until today that this is exactly what you wanted. But now I realize (I think) that you want ![description text title] to render the description as alt text for the image. Is that right? I'm asking for clarification here again so I can understand without ambiguity what you want/need. Thanks.

@gitpitch
Copy link
Owner

I personally would prefer that the default, with no attrib name specification would be to input an alt rather than a title attribute.

The new default behavior for images across all GitPitch products is to set alt text not title text when using ![descriptive text](path/to/img) markdown syntax. The Image Manipulation Guide has been updated to reflect this change. The guide also provides a brief description of the benefits of using alt text on images as I felt that might be helpful to people (like me) who did not fully appreciate their importance in the context of accessibility.

Testing appreciated. And please let me know if this issue is now resolved? Thanks, David.

@becka11y
Copy link
Author

becka11y commented May 14, 2020 via email

@gitpitch
Copy link
Owner

Ok, no rush Becky. Good luck with your conference today.

@gitpitch
Copy link
Owner

Closing issue as resolved. If you have additional input please feel free to re-open the issue anytime. Cheers, David.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants