The longdesc attribute is removed by the editor when using advanced image, if it's added to the extended_valid_elements in tinymce.inc it won't get removed anymore. See the attached patch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markwittens’s picture

FileSize
732 bytes

Last patch was created without the right parameters, attached is the right patch.

ckrina’s picture

I'm having the same issue in Drupal 7, in CKEditor.
Any ideas to fix it? Thank you.

TwoD’s picture

Version: 6.x-2.4 » 7.x-2.x-dev
Component: Code » Editor - TinyMCE
Status: Needs review » Reviewed & tested by the community
FileSize
792 bytes

Adding longdesc there works and the attribute is valid (though not commonly used AFAIK).

The patch was created from the wrong folder (wysiwyg/editors), instead of the root wysiwyg folder, re-rolled it for you.

I did a quick grep -r longdesc ckeditor, which revealed that the word 'longdesc' is only used in the iframe plugin, not the image plugin, so I guess CKEditor doesn't support it.
CKEditor does not use an externally supplied tag/attribute whitelist in the same matter TinyMCE does anyway so we could probably not have changed it.

sun’s picture

Issue tags: +Needs backport to D6

Thanks, looks good!

TwoD’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Committed #3 to D5, D6 and D7. Thanks for spotting this!
The patch will be in the -dev snapshots within 12hrs and it'll be part of the next release.

mgifford’s picture

Issue summary: View changes
Issue tags: +longdesc, +longdesc attribute WCAG accessible

It's not very commonly used, but very happy to see available here.

mgifford’s picture

Issue tags: -longdesc attribute WCAG accessible