Skip to content

Commit

Permalink
Merge pull request #638 from inghamemerson/inghamemerson/image-alt-text
Browse files Browse the repository at this point in the history
Default widget image alt to null
  • Loading branch information
ashyablok authored Aug 6, 2024
2 parents f573a9e + 96c556a commit a62da2d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions dist/pathfora.js
Original file line number Diff line number Diff line change
Expand Up @@ -2747,6 +2747,7 @@
var widgetImage = document$1.createElement('img');
widgetImage.src = config.image;
widgetImage.className = 'pf-widget-img';
widgetImage.alt = '';
if (config.layout === 'button') ; else if (config.layout === 'modal' || config.layout === 'inline') {
widgetContent.appendChild(widgetImage);
} else {
Expand Down
2 changes: 1 addition & 1 deletion dist/pathfora.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/rollup/widgets/construct-widget-layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ export default function constructWidgetLayout(widget, config) {
var widgetImage = document.createElement('img');
widgetImage.src = config.image;
widgetImage.className = 'pf-widget-img';
widgetImage.alt = '';
if (config.layout === 'button') {
// NOTE Images are not compatible with the button layout
} else if (config.layout === 'modal' || config.layout === 'inline') {
Expand Down

0 comments on commit a62da2d

Please sign in to comment.