Browse Source

Fix media description in various media modals (#8678)

pull/4/head
ThibG 5 years ago
committed by Eugen Rochko
parent
commit
4959ead07c
4 changed files with 5 additions and 3 deletions
  1. +1
    -1
      app/javascript/mastodon/features/ui/components/media_modal.js
  2. +1
    -1
      app/javascript/mastodon/features/ui/components/video_modal.js
  3. +1
    -0
      app/javascript/mastodon/features/ui/components/zoomable_image.js
  4. +2
    -1
      app/javascript/mastodon/features/video/index.js

+ 1
- 1
app/javascript/mastodon/features/ui/components/media_modal.js View File

@ -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')}
/>
);

+ 1
- 1
app/javascript/mastodon/features/ui/components/video_modal.js View File

@ -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>

+ 1
- 0
app/javascript/mastodon/features/ui/components/zoomable_image.js View File

@ -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})`,

+ 2
- 1
app/javascript/mastodon/features/video/index.js View File

@ -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,
});

Loading…
Cancel
Save