Skip to content

Commit

Permalink
Update alt text behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
helenm committed Mar 12, 2020
1 parent 79ebda3 commit ca2f1e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1875,10 +1875,10 @@ exports[`CurrentTrack when missing data renders defaults 1`] = `

exports[`CurrentTrack when no image renders default image 1`] = `
<img
alt="Happiness"
alt="Kyan Limited Edition Collectors Vinyl"
className="c-nowPlaying__image"
src="default-artwork.png"
/>
`;

exports[`CurrentTrack when no image renders default image 2`] = `"Happiness"`;
exports[`CurrentTrack when no image renders default image 2`] = `"Kyan Limited Edition Collectors Vinyl"`;
2 changes: 1 addition & 1 deletion frontend/src/components/current-track/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const CurrentTrack = (props) => {
<img
src={track.image || defaultImage}
className='c-nowPlaying__image'
alt={(track.name || 'Kyan Limited Edition Collectors Vinyl')}
alt={(track.image ? track.name : 'Kyan Limited Edition Collectors Vinyl')}
/>
<div className='c-nowPlaying__trackInfo'>
<div className='c-nowPlaying__rating'><TrackVotes metrics={track.metrics} /></div>
Expand Down

0 comments on commit ca2f1e4

Please sign in to comment.