improve accessibility for image captions

This commit is contained in:
Daniel Bulant 2022-05-17 14:40:44 +02:00
parent b1967f5db1
commit c14e6e1074

View file

@ -1,18 +1,24 @@
<script>
import Described from "./described.svelte";
export var src;
export var alt;
export var title;
</script>
<Described>
<figure>
<img {src} {alt} {title} name="content">
<slot />
</Described>
<figcaption>
<slot />
</figcaption>
</figure>
<style>
img {
border-radius: 5px;
}
figcaption {
text-align: center;
color: gray;
width: 100%;
display: inline-block;
}
</style>