CMS Development

Jere
Contributor

The default "Image" drag and drop module adds the alt value as title value too, any way to prevent?

Jere_0-1630588079058.png

 

Example image above, it's the default drag & drop image module that themes have built-in. When changing the alt text, HubSpot automatically modifies the title attribute (title="example") to be the same as the alt text.

 

This is not wanted behaviour, any way to disable this? Or change the title text? In this case the reason for disabling is so that the alt text doesn't appear on mouse hover, but in general alt and title are two separate entities that have different purposes and should not be made the same like this.

 

0 Upvotes
4 Replies 4
dennisedson
HubSpot Product Team
HubSpot Product Team

The default "Image" drag and drop module adds the alt value as title value too, any way to prevent?

@Jere ,

Appears the product team is already working on this 😀

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

The default "Image" drag and drop module adds the alt value as title value too, any way to prevent?

@Jere 

Is it possible to just add a blank title attribute to the img tag?

title=""

0 Upvotes
Jere
Contributor

The default "Image" drag and drop module adds the alt value as title value too, any way to prevent?

Hi @dennisedson! The module is the default image module, which means that it can't be edited.

 

However I did find a workaround for the issue in this case, but the general problem still lays there: alt and title aren't the same thing.

 

Workaround was simply this via CSS:

img {
pointer-events: none;
}

 

However the drawback of it is that it disables also right clicking images and dragging them. (Not an issue in this case)

dennisedson
HubSpot Product Team
HubSpot Product Team

The default "Image" drag and drop module adds the alt value as title value too, any way to prevent?

ah.  Apologies, I was thinking of the image field.

I will report to the team (no promises on a  timeline, but we can at least make sure the product team sees this 😉 ).

 

0 Upvotes