Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In the media module, we hacked the WYSIWYG to override the alt and title attributes of images. I have created a patch to make that more generic, allowing us to override whatever fields are defined for a file type, at #835516: Add ability to edit file meta data and fields when embedded in WYSIWYG.
I like the wording that was used in that form's description at #1881152: Browser display cleanup, so I have created a patch to add the description to the alt and title attributes for the image file type. I will attach that patch momentarily.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2012868-alt-title-description-8.patch | 2.21 KB | KarlKedrovsky |
#2 | 2012868-alt-title-description-2.patch | 1.08 KB | aaron |
#1 | 2012868-alt-title-description-1.patch | 1.08 KB | aaron |
Comments
Comment #1
aaron CreditAttribution: aaron commentedComment #2
aaron CreditAttribution: aaron commentedOops! Here is a good patch.
Comment #3
aaron CreditAttribution: aaron commentedBump
Comment #4
gmclelland CreditAttribution: gmclelland commentedI haven't tested this yet, but the patch looks very small, simple, and helpful.
Comment #5
KarlKedrovsky CreditAttribution: KarlKedrovsky commentedI've tested this on a fresh install of the media_dev distribution and it worked just fine.
Comment #6
Dave ReidShould we also update the existing field instances with these descriptions if they're still empty?
Comment #7
HaloFX CreditAttribution: HaloFX commented#2 also worked fine for me on a fresh install.
Comment #8
KarlKedrovsky CreditAttribution: KarlKedrovsky commentedAttached is an updated patch that updates existing instances of the alt and title text if they haven't been changed from the previous defaults.
Comment #9
HaloFX CreditAttribution: HaloFX commented#8 tested on Media_dev profile and works for me!
Comment #10
Dave ReidCommitted #8 to 7.x-2.x. Thanks all! http://drupalcode.org/project/file_entity.git/commit/e8d0faa