From 33980f9a7ab6f8aaa4063f626de51b0b0c79b6d5 Mon Sep 17 00:00:00 2001 From: Liam Morland Date: Tue, 27 Oct 2015 13:47:54 -0400 Subject: [PATCH] Support @alt for images. Add an alt attribute if alt data is provided. --- source/js/Core/Media/VMM.MediaElement.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/js/Core/Media/VMM.MediaElement.js b/source/js/Core/Media/VMM.MediaElement.js index 2d1f6f5ce..1266c9dab 100644 --- a/source/js/Core/Media/VMM.MediaElement.js +++ b/source/js/Core/Media/VMM.MediaElement.js @@ -122,7 +122,11 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') { } // IMAGE if (m.type == "image") { - mediaElem = "
"; + var alt = ""; + if (data.alt) { + alt = " alt='" + data.alt + "'"; + } + mediaElem = "
"; // FLICKR } else if (m.type == "flickr") { //mediaElem = "
" + loading_messege + "
"; @@ -222,4 +226,4 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') { } }).init(); -} \ No newline at end of file +}