summaryrefslogtreecommitdiff
path: root/ext/js/display/sandbox
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/display/sandbox')
-rw-r--r--ext/js/display/sandbox/structured-content-generator.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/js/display/sandbox/structured-content-generator.js b/ext/js/display/sandbox/structured-content-generator.js
index a28464ae..ad63667a 100644
--- a/ext/js/display/sandbox/structured-content-generator.js
+++ b/ext/js/display/sandbox/structured-content-generator.js
@@ -65,6 +65,7 @@ export class StructuredContentGenerator {
preferredWidth,
preferredHeight,
title,
+ alt,
pixelated,
imageRendering,
appearance,
@@ -102,7 +103,7 @@ export class StructuredContentGenerator {
imageContainer.appendChild(imageBackground);
const image = /** @type {HTMLImageElement} */ (this._createElement('img', 'gloss-image'));
- image.alt = '';
+ image.alt = typeof alt === 'string' ? alt : '';
imageContainer.appendChild(image);
const overlay = this._createElement('span', 'gloss-image-container-overlay');