Under Community Review

Enable override of ALT attribute in WYSIWYG fields

ALT attribute is currently entered via the description field when adding the image as a component.  However, for accessibility, the ALT should be contextual.

On one page, the image may be communicating one thing, but on another page, it might be used to communicate something else, or be a decorative image.  This is especially true if the image is a link.

Rather than duplicate the same resource (image) just to have different ALT text, it would be far more efficient and better for accessibility to enable a default ALT text but then be able to override it when inserting the image into the page via the WYSIWYG field (or even in another area).

  • The DITA specification has deprecated the @alt attribute on <image>, recommending instead that we use the <alt> element, which goes alongside <image> within the <figure>. In this way, it's easy to define different alt text when an image is used in different contexts. Refer to https://docs.oasis-open.org/dita/v1.0/langspec/alt.html

    Hope this is helpful.

  • +1 for thinking about accessibility, however the alt attribute on an img really does describe the image, and not a link that it's part of. If the image does not convey information, then you should use alt="". You should be thinking of the use a fully sighted person would make of the information. If it's decorative, you don't want the assistive technology to read out a load of noise. If it's a link - the assistive technology can "see" that; you should be using the link text to describe what the link links to. So the close relationship between the image and its alt is pretty much justified. Try to imagine an image which in one context conveys information, and in another doesn't. Sometimes looking at a11y makes you realise you aren't serving your fully-sighted visitors as well as you thought.

  • When we insert an image in the WYSIWYG field and override the ALT in the source, it still renders with whatever the description/ALT is in the component.  In other words, the ALT WYSWYG is overridden or ignored.

  • Does the WYSIWYG (what-you-see-is-what-you-get) editor refer to the Tridion Sites rich text format (RTF) area?

    Tridion Sites currently has the ability to set an alt text on the linked item in the RTF area as well as the ability to configure a field to provide alternative text in the selection fo the image.

    Is this something you could revisit with your development team in the template logic?