Skip to content

Commit c6ef941

Browse files
committed
chore(media): add alt-text
1 parent 4814fbf commit c6ef941

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pages/media.qmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This shows the image at its default size and alignment:
2525
![](../images/south_cloisters.jpg)
2626
```
2727

28-
![](../images/south_cloisters.jpg)
28+
![](../images/south_cloisters.jpg){fig-alt="Default size and alignment example"}
2929

3030
You can control the size of the image with `width`:
3131

@@ -35,39 +35,39 @@ TODO: EXPLAIN CURLY BRACES
3535
![](../images/south_cloisters.jpg){width=50%}
3636
```
3737

38-
![](../images/south_cloisters.jpg){width=50%}
38+
![](../images/south_cloisters.jpg){width=50% fig-alt="Custom width example"}
3939

4040
To add a caption, put text inside the square brackets:
4141

4242
```markdown
4343
![Photograph of South Cloisters on St Lukes Campus](../images/south_cloisters.jpg)
4444
```
4545

46-
![Photograph of South Cloisters on St Lukes Campus](../images/south_cloisters.jpg)
46+
![Photograph of South Cloisters on St Lukes Campus](../images/south_cloisters.jpg){fig-alt="Caption example"}
4747

4848
We can control alignment using `fig-align`:
4949

5050
```markdown
5151
![](../images/south_cloisters.jpg){fig-align="center"}
5252
```
5353

54-
![](../images/south_cloisters.jpg){fig-align="center"}
54+
![](../images/south_cloisters.jpg){fig-align="center" fig-alt="Centered figure example"}
5555

5656
Adding `.lightbox` lets people click to see a larger version of the image - helpful when you have detailed figures or diagrams.
5757

5858
```markdown
5959
![](../images/south_cloisters.jpg){.lightbox}
6060
```
6161

62-
![](../images/south_cloisters.jpg){.lightbox}
62+
![](../images/south_cloisters.jpg){.lightbox fig-alt="Lightbox example"}
6363

6464
You can also make your figure a hyperlink:
6565

6666
```markdown
6767
[![](../images/south_cloisters.jpg)](https://medicine.exeter.ac.uk/research/facilities/southcloisters/)
6868
```
6969

70-
[![](../images/south_cloisters.jpg)](https://medicine.exeter.ac.uk/research/facilities/southcloisters/)
70+
[![](../images/south_cloisters.jpg)](https://medicine.exeter.ac.uk/research/facilities/southcloisters/){fig-alt="Linked image example"}
7171

7272
To add alternative text to your image:
7373

0 commit comments

Comments
 (0)