Fix our media gallery not having alt text and tooltips

master
Ondřej Hruška 7 years ago
parent b0b5ff1b0f
commit eeaa8fba43
No known key found for this signature in database
GPG Key ID: 2C5FD5035250423D
  1. 8
      app/javascript/glitch/components/status/gallery/item.js

@ -117,7 +117,13 @@ export default class StatusGalleryItem extends React.PureComponent {
onClick={this.handleClick}
target='_blank'
>
<img className={letterbox ? 'letterbox' : ''} src={previewUrl} srcSet={srcSet} sizes={sizes} alt='' />
<img
className={letterbox ? 'letterbox' : ''}
src={previewUrl} srcSet={srcSet}
sizes={sizes}
alt={attachment.get('description')}
title={attachment.get('description')}
/>
</a>
);
} else if (attachment.get('type') === 'gifv') {

Loading…
Cancel
Save