Skip to content

Commit

Permalink
Fix media description in various media modals (#8678)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and Gargron committed Sep 13, 2018
1 parent f8160b6 commit 4959ead
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default class MediaModal extends ImmutablePureComponent {
startTime={time || 0}
onCloseVideo={onClose}
detailed
description={image.get('description')}
alt={image.get('description')}
key={image.get('url')}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class VideoModal extends ImmutablePureComponent {
startTime={time}
onCloseVideo={onClose}
detailed
description={media.get('description')}
alt={media.get('description')}
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export default class ZoomableImage extends React.PureComponent {
role='presentation'
ref={this.setImageRef}
alt={alt}
title={alt}
src={src}
style={{
transform: `scale(${scale})`,
Expand Down
3 changes: 2 additions & 1 deletion app/javascript/mastodon/features/video/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,12 @@ export default class Video extends React.PureComponent {
}

handleOpenVideo = () => {
const { src, preview, width, height } = this.props;
const { src, preview, width, height, alt } = this.props;
const media = fromJS({
type: 'video',
url: src,
preview_url: preview,
description: alt,
width,
height,
});
Expand Down

0 comments on commit 4959ead

Please sign in to comment.