Set the title attr in addition to alt for images

This commit is contained in:
Thomas Sileo 2022-07-27 09:29:20 +02:00
parent 064921fdd1
commit 2bbb23b7d9
1 changed files with 1 additions and 1 deletions

View File

@ -249,7 +249,7 @@
{% endif %}
{% for attachment in object.attachments %}
{% if attachment.type == "Image" or (attachment | has_media_type("image")) %}
<img src="{{ attachment.resized_url or attachment.proxied_url }}"{% if attachment.name %} alt="{{ attachment.name }}"{% endif %} class="attachment">
<img src="{{ attachment.resized_url or attachment.proxied_url }}"{% if attachment.name %} title="{{ attachment.name }}" alt="{{ attachment.name }}"{% endif %} class="attachment">
{% elif attachment.type == "Video" or (attachment | has_media_type("video")) %}
<video controls preload="metadata" src="{{ attachment.url | media_proxy_url }}"{% if attachment.name %} title="{{ attachment.name }}"{% endif %} class="attachment"></video>
{% elif attachment.type == "Audio" or (attachment | has_media_type("audio")) %}