From fc6d65be71b24b7850e249517a6a1b16220801d1 Mon Sep 17 00:00:00 2001 From: Jonathan Keane Date: Sat, 3 Jul 2021 21:49:29 -0500 Subject: [PATCH] add description as alt text in viewer mode --- src/jquery.nanogallery2.core.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jquery.nanogallery2.core.js b/src/jquery.nanogallery2.core.js index 3aaf4ac9..0a78a265 100644 --- a/src/jquery.nanogallery2.core.js +++ b/src/jquery.nanogallery2.core.js @@ -914,8 +914,9 @@ NGY2Item.prototype.setMediaURL = function( url, mediaKind ) { this.src = url; this.mediaKind = mediaKind; + var alt_text = this.description; if( mediaKind == 'img' ) { - this.mediaMarkup = ' '; + this.mediaMarkup = '' + alt_text + ''; } };