Skip to content

Commit

Permalink
Merge pull request #1343 from mateomustapic/LPS-98018_imgAltFix
Browse files Browse the repository at this point in the history
fix: set image alt attribute properly on ie
  • Loading branch information
julien authored Nov 20, 2019
2 parents af790a9 + 956fdbc commit 9e9f3ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/buttons/button-accessibility-image-alt.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ class ButtonAccessibilityImageAlt extends React.Component {
imageAlt,
});

this.state.element.setAttribute('alt', imageAlt);
const imageElement = this.state.element.findOne('img');
const image = imageElement ? imageElement : this.state.element;

image.setAttribute('alt', imageAlt);

editor.fire('actionPerformed', this);

Expand Down

0 comments on commit 9e9f3ef

Please sign in to comment.