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.

Alt Text field for apostrophe-images

See original GitHub issue

Create a new dedicated field for alt text for apostrophe-images. Currently the title or description field is being used for alt text, but improving the the schema to include a dedicated field for alt text would be good, as well as adding explicit help text to each field. To avoid any sort of BC break and confusion on previous implementations of these fields, we can create a feature flag (an option passed to the apostrophe-images module) that would activate these new fields.

Alt text would be made available the same way other image fields are here:

https://github.com/apostrophecms/apostrophe/blob/81cdcc51dd0ec925754ead08bf8b97f34f826a65/lib/modules/apostrophe-attachments/lib/api.js#L449-L460

screen shot 2018-10-04 at 3 31 05 pm

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:25 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
sachowdhary786commented, Aug 18, 2020

Brilliant! I will go back and give this a shot. Thanks for coming back to me so quickly on this!

1reaction
abeacommented, Aug 18, 2020

@sachowdhary786 The question of this issue is how to add a dedicated alt text field. That will be part of Apostrophe 3.

There is no barrier to meeting this accessibility requirement in Apostrophe 2, but it does require you to choose the field you will use for alt text. The most common choice, I think, is description. You then would write your templates to use that field in the alt attribute. You could even add fall back options in the template so it could use other fields if someone leaves description blank.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Guide to Using Alt-text to Make Images More Accessible
For example, on Twitter, add alt-text using the “image description” field. ... Don't use quotation marks or apostrophes within alt-text, as browsers will ......
Read more >
Writing Good Alt Text - Flywheel Strategic
At first glance, writing good alt text seems like an easy task. ... have an apostrophe or quotation marks in an image's alt...
Read more >
Image Alt Tags and "Curly" Apostrophe / Quotes - CKEditor
If for some reason you paste text that has curly apostrophes or quotes (usually copied from Microsoft Word) in the Alt tag field...
Read more >
Working with images and media files
If inserting images with the attachment field we would need to provide alt text with another field. The other two options will usually...
Read more >
Escape apostrophe read from <img ... alt= in JQuery
There is an apostrophe in the alt attribute value. ... graceful way of escaping this/any apostrophe contained in this alt tag so that...
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