about summary refs log tree commit diff
path: root/app/javascript/glitch/components
diff options
context:
space:
mode:
authorOndřej Hruška <ondra@ondrovo.com>2017-10-11 22:02:24 +0200
committerOndřej Hruška <ondra@ondrovo.com>2017-10-11 22:02:24 +0200
commiteeaa8fba43d40e9ecaf6c16c5989c8ead89b4935 (patch)
tree03e27451c4dfe5408532c326e38d08997102a16c /app/javascript/glitch/components
parentb0b5ff1b0f0a1422e85e7059df598e2b89bd657e (diff)
Fix our media gallery not having alt text and tooltips
Diffstat (limited to 'app/javascript/glitch/components')
-rw-r--r--app/javascript/glitch/components/status/gallery/item.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/javascript/glitch/components/status/gallery/item.js b/app/javascript/glitch/components/status/gallery/item.js
index ab4aab8dc..7fcc14377 100644
--- a/app/javascript/glitch/components/status/gallery/item.js
+++ b/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') {