You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How would I go about removing the alt="" attribute entirely? I'm hoping to make Assets uploaded directly into a Redactor field use the Asset's alt-text. Currently when I upload the asset into a Redactor field, it uses the "Title" field from Redactor's uploader to act as the asset's alt-text.
(Update)
I was able to find an answer on the Craft Stack exchange:
It seems like that capability isn't implemented in Craft yet, to have Redactor fields use the asset's alt-text. Perhaps an issue/feature suggestion is to be able to configure the Upload fields in a Redactor field? So changing the "Title" text to be "Title (used as alternative text)" or something.
Description
Empty alt="" attributes on images get removed.
I found in https://github.com/craftcms/redactor/blob/v2/src/assets/field/src/js/RedactorOverrides.js
the following snippet:
Which seems to be the cause of my issue.
Is there a way to override this so the empty alt="" attr is allowed? I absolutely need to follow this guideline:
https://www.w3.org/WAI/WCAG21/Techniques/html/H67.html
Steps to reproduce
Additional info
The text was updated successfully, but these errors were encountered: