question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cloudinary-react: Rendered img tag missing alt attribute

See original GitHub issue

Bug report for Cloudinary React SDK

Before proceeding, please update to latest version and test if the issue persists Done

Describe the bug in a sentence or two.

Rendered img tag is missing required alt attribute. I have made sure I have a value set for the image’s “Description (alt)” field in Cloudinary’s UI, but it does not get output to the front-end.

Issue Type (Can be multiple)

[ ] Build - Can’t install or import the SDK [ ] Babel - Babel errors or cross browser issues [ ] UI/Performance - Display or performance issues [X] Behaviour - Functions aren’t working as expected (Such as generate URL) [ ] Documentation - Inconsistency between the docs and behaviour [ ] Incorrect Types - For typescript users who are having problems with our d.ts files [ ] Other (Specify)

Steps to reproduce

  1. Upload an image
  2. Set its “Description (alt)” field to some text
  3. Copy its public_id for use in the next step
  4. import {Image} from 'cloudinary-react' /* ... later ... */ <Image publicId={public_id} />
  5. Use a browser’s web inspector to note that the rendered img tag is missing the required alt attribute.

Error screenshots

Screen Shot 2020-05-25 at 6 37 39 pm

Browsers (if issue relates to UI, else ignore)

[ ] Chrome [ ] Firefox [ ] Safari [ ] Other (Specify) [X] All

Versions and Libraries (fill in the version numbers)

React Cloudinary SDK - 1.5.0 React - 16.13.1 Create-React-App - N/A

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
joeldbirchcommented, May 25, 2020

Thanks for the quick reply. I respectfully disagree that this issue is resolved as the point is that an img tag must have an alt attribute. Even if purely presentational, the alt attribute must still exist but be blank, eg: alt=“”.

Also, given the declarative nature of the React wrapper, it seems strange to require users to retrieve the alt text imperatively. It removes the convenience if such required functionality needs to be implemented manually.

On 25 May 2020, at 10:46 pm, Eyal Katz Talmon notifications@github.com wrote:

Closed #161.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

0reactions
eyalktCloudinarycommented, May 26, 2020

Sure, thank you for reaching out! In my opinion, having an informative alt is indeed important, and should be set. It can also help with SEO.

Read more comments on GitHub >

github_iconTop Results From Across the Web

m16y: Make Your Cloudinary Images More Accessible
When you upload an image to Cloudinary, we assign it a metadata field called Context Metadata . Within this field is a placeholder...
Read more >
How do I specify an empty alt attribute in React/JSX?
It's to do with how VoiceOver handles empty alt attributes. If you provide an empty string as the alt attribute it will still...
Read more >
Cloudinary React Components - David Walsh Blog
Note that you can add all of the usual attributes for each image, like alt , title , and so on. Video. The...
Read more >
How to use the Next.js Image Component Effectively
Rendering your image to the browser according to the specified attributes (e.g. the same thing the native img HTML element does) · Generating...
Read more >
Image upload with Django and Cloudinary - Alpha Coder
Cloudinary is one of such platforms. It tags itself as the media management platform for web and mobile developers — an end-to-end solution...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found