diff --git a/coral-component-card/src/scripts/Card.js b/coral-component-card/src/scripts/Card.js index eeb138ef5b..52b3a0a1aa 100644 --- a/coral-component-card/src/scripts/Card.js +++ b/coral-component-card/src/scripts/Card.js @@ -94,6 +94,14 @@ const Card = Decorator(class extends BaseComponent(HTMLElement) { handle: 'asset', tagName: 'coral-card-asset', insert: function (asset) { + const coralTitle = this.querySelector('coral-card-title'); + const imgElement = asset.querySelector('img'); + if (imgElement && coralTitle) { + const coralTitleTextContent = coralTitle.textContent; + if (coralTitleTextContent) { + imgElement.setAttribute('title', coralTitleTextContent); + } + } this.insertBefore(asset, this.info || this._elements.wrapper || null); } });