diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-09-28 15:31:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-28 15:31:31 +0200 |
commit | 4ec1771165ab8dd40e52804fd087eacfab25290b (patch) | |
tree | e356a5477ee1790367a9b8981fdf5f6419540f88 /app/javascript/mastodon/components/media_gallery.js | |
parent | 3d9b8847d21d886886baae483304288139669795 (diff) |
Add ability to specify alternative text for media attachments (#5123)
* Fix #117 - Add ability to specify alternative text for media attachments - POST /api/v1/media accepts `description` straight away - PUT /api/v1/media/:id to update `description` (only for unattached ones) - Serialized as `name` of Document object in ActivityPub - Uploads form adjusted for better performance and description input * Add tests * Change undo button blend mode to difference
Diffstat (limited to 'app/javascript/mastodon/components/media_gallery.js')
-rw-r--r-- | app/javascript/mastodon/components/media_gallery.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/javascript/mastodon/components/media_gallery.js b/app/javascript/mastodon/components/media_gallery.js index a81409871..38b26b1fc 100644 --- a/app/javascript/mastodon/components/media_gallery.js +++ b/app/javascript/mastodon/components/media_gallery.js @@ -136,7 +136,7 @@ class Item extends React.PureComponent { onClick={this.handleClick} target='_blank' > - <img src={previewUrl} srcSet={srcSet} sizes={sizes} alt='' /> + <img src={previewUrl} srcSet={srcSet} sizes={sizes} alt={attachment.get('description')} /> </a> ); } else if (attachment.get('type') === 'gifv') { @@ -146,6 +146,7 @@ class Item extends React.PureComponent { <div className={classNames('media-gallery__gifv', { autoplay: autoPlay })}> <video className='media-gallery__item-gifv-thumbnail' + aria-label={attachment.get('description')} role='application' src={attachment.get('url')} onClick={this.handleClick} |