Skip to content

Commit

Permalink
image alt
Browse files Browse the repository at this point in the history
  • Loading branch information
Clararigaud committed Sep 26, 2024
1 parent 8c584cc commit 8d4b6ce
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions assets/js/theme/components/lightbox/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ window.osuny.lightbox.LightboxContainer.prototype = {
this.popupDetails.close();
this._removeImageContent();
this._setImageContent(lightbox);
this.content.focus();
// this.content.focus();
this.controlRack.load(lightbox);
this.popupDetails.load(lightbox);
},
Expand Down Expand Up @@ -75,10 +75,9 @@ window.osuny.lightbox.LightboxContainer.prototype = {
_setImageContent (lightbox) {
var image = document.createElement('img');
image.setAttribute('src', lightbox.url);
if (lightbox.description) {
image.setAttribute('alt', lightbox.description);
}
image.setAttribute('alt', lightbox.description || lightbox.credit || '');
this.content.append(image);
image.focus();
},
_removeImageContent () {
this.content.innerHTML = '';
Expand Down

0 comments on commit 8d4b6ce

Please sign in to comment.