Merge pull request #746 from pixelfed/frontend-ui-refactor

Add alt text to media presenters, fixes #700
This commit is contained in:
daniel 2019-01-05 23:10:33 -07:00 committed by GitHub
commit 701022cdff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

Binary file not shown.

Binary file not shown.

View file

@ -18,7 +18,7 @@
<source :src="media.url" :type="media.mime">
</video>
<img v-else-if="media.type == 'Image'" slot="img" class="d-block img-fluid w-100" :src="media.url" :alt="media.description">
<img v-else-if="media.type == 'Image'" slot="img" class="d-block img-fluid w-100" :src="media.url" :alt="media.description" :title="media.description">
<p v-else class="text-center p-0 font-weight-bold text-white">Error: Problem rendering preview.</p>
@ -40,7 +40,7 @@
<source :src="media.url" :type="media.mime">
</video>
<img v-else-if="media.type == 'Image'" slot="img" class="d-block img-fluid w-100" :src="media.url" :alt="media.description">
<img v-else-if="media.type == 'Image'" slot="img" class="d-block img-fluid w-100" :src="media.url" :alt="media.description" :title="media.description">
<p v-else class="text-center p-0 font-weight-bold text-white">Error: Problem rendering preview.</p>

View file

@ -13,7 +13,7 @@
:interval="0"
>
<b-carousel-slide v-for="(img, index) in status.media_attachments" :key="img.id">
<img slot="img" class="d-block img-fluid w-100" :src="img.url" :alt="img.description">
<img slot="img" class="d-block img-fluid w-100" :src="img.url" :alt="img.description" :title="img.description">
</b-carousel-slide>
</b-carousel>
</details>
@ -27,7 +27,7 @@
:interval="0"
>
<b-carousel-slide v-for="(img, index) in status.media_attachments" :key="img.id">
<img slot="img" class="d-block img-fluid w-100" :src="img.url" :alt="img.description">
<img slot="img" class="d-block img-fluid w-100" :src="img.url" :alt="img.description" :title="img.description">
</b-carousel-slide>
</b-carousel>
</div>

View file

@ -6,13 +6,13 @@
<p class="font-weight-light">(click to show)</p>
</summary>
<a class="max-hide-overflow" :href="status.url" :class="status.media_attachments[0].filter_class">
<img class="card-img-top" :src="status.media_attachments[0].url">
<img class="card-img-top" :src="status.media_attachments[0].url" :alt="status.media_attachments[0].description" :title="status.media_attachments[0].description">
</a>
</details>
</div>
<div v-else>
<div :class="status.media_attachments[0].filter_class">
<img class="card-img-top" :src="status.media_attachments[0].url">
<img class="card-img-top" :src="status.media_attachments[0].url" :alt="status.media_attachments[0].description" :title="status.media_attachments[0].description">
</div>
</div>
</template>