|
139 | 139 |
|
140 | 140 | function _initImg(item) { |
141 | 141 | var src = item.getAttribute('data-src'); |
142 | | - |
| 142 | + var imageTextAlternative = item.getAttribute('data-alt') |
143 | 143 | var options = {}; |
144 | 144 | options.size = item.getAttribute('data-crop-size'); |
145 | 145 | options.aspect = item.getAttribute('data-crop-aspect'); |
|
150 | 150 | // enable for cache |
151 | 151 | // buildfire.imageLib.cropImage(src, options, img); |
152 | 152 | img.src = buildfire.imageLib.cropImage(src, options); |
153 | | - |
| 153 | + img.alt = imageTextAlternative; |
| 154 | + img.title = imageTextAlternative; |
154 | 155 | img.className = 'reveal-img'; |
155 | 156 |
|
156 | 157 | if (img.complete) _addImg(); |
|
292 | 293 | divImg.setAttribute("data-crop-aspect", options.aspect); |
293 | 294 | divImg.setAttribute("data-crop-width", options.width); |
294 | 295 | divImg.setAttribute("data-crop-height", options.height); |
| 296 | + divImg.setAttribute("data-alt", p.title); |
295 | 297 | divImg.classList.add('lazy-img'); |
296 | 298 | } |
297 | 299 | else { |
|
811 | 813 | width: window.innerWidth, |
812 | 814 | height: Math.ceil(9 * (window.innerWidth) / 16) |
813 | 815 | })); |
814 | | - img.alt = "Carousel Image"; |
815 | 816 | carouselContainer.appendChild(img); |
816 | 817 | img.addEventListener("click", function () { |
817 | 818 | buildfire.actionItems.execute(carouselImages[0], function (err, result) { |
|
882 | 883 | infinite:false, |
883 | 884 | autoInterval:speed |
884 | 885 | }); |
885 | | - |
886 | 886 | } else { |
887 | 887 | appendOneImage(carouselImages); |
888 | 888 | } |
|
0 commit comments