]> cat aescling's git repositories - mastodon.git/commitdiff
Fix our media gallery not having alt text and tooltips
authorOndřej Hruška <ondra@ondrovo.com>
Wed, 11 Oct 2017 20:02:24 +0000 (22:02 +0200)
committerOndřej Hruška <ondra@ondrovo.com>
Wed, 11 Oct 2017 20:02:24 +0000 (22:02 +0200)
app/javascript/glitch/components/status/gallery/item.js

index ab4aab8dcd0c45ae4b723559f1fc09bfc368bc17..7fcc14377777da955b9f1c7579856813d9b8680e 100644 (file)
@@ -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') {
This page took 0.029045 seconds and 3 git commands to generate.