From 93cdbe4b718f9f7a2cd0d6efc545ec51d049812f Mon Sep 17 00:00:00 2001 From: Stephen Kraus <8003332+stephenmk@users.noreply.github.com> Date: Fri, 22 Dec 2023 19:17:17 -0600 Subject: Add support for alt attribute on structured content images (#359) * Add support for alt attribute on structured content images * Add new `alt` property for structured content images * Update test script with new media file count --------- Co-authored-by: stephenmk --- ext/js/language/dictionary-importer.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext/js/language') diff --git a/ext/js/language/dictionary-importer.js b/ext/js/language/dictionary-importer.js index 2b9792ea..2c0c7e9c 100644 --- a/ext/js/language/dictionary-importer.js +++ b/ext/js/language/dictionary-importer.js @@ -503,6 +503,7 @@ export class DictionaryImporter { width: preferredWidth, height: preferredHeight, title, + alt, description, pixelated, imageRendering, @@ -518,6 +519,7 @@ export class DictionaryImporter { if (typeof preferredWidth === 'number') { target.preferredWidth = preferredWidth; } if (typeof preferredHeight === 'number') { target.preferredHeight = preferredHeight; } if (typeof title === 'string') { target.title = title; } + if (typeof alt === 'string') { target.alt = alt; } if (typeof description === 'string') { target.description = description; } if (typeof pixelated === 'boolean') { target.pixelated = pixelated; } if (typeof imageRendering === 'string') { target.imageRendering = imageRendering; } -- cgit v1.2.3