From ac0ea237c195ab74b1e56eaf451a8b2ef995cb84 Mon Sep 17 00:00:00 2001 From: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> Date: Fri, 20 Jun 2025 00:23:44 +0200 Subject: [PATCH 1/2] fix a11y of the figure shortcode Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> --- templates/shortcodes/figure.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/shortcodes/figure.html b/templates/shortcodes/figure.html index 76f450a617..c0bc410a6b 100644 --- a/templates/shortcodes/figure.html +++ b/templates/shortcodes/figure.html @@ -1,4 +1,4 @@
- {{ caption }} +
{{ caption | markdown | safe }}
-
\ No newline at end of file + From 20958bf377ce73b16d310815a8186bbdce933adc Mon Sep 17 00:00:00 2001 From: Kim Brose <2803622+HarHarLinks@users.noreply.github.com> Date: Sat, 5 Jul 2025 13:30:38 +0000 Subject: [PATCH 2/2] Update CONTENT.md --- CONTENT.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTENT.md b/CONTENT.md index 1be8d68b98..2031aeddf2 100644 --- a/CONTENT.md +++ b/CONTENT.md @@ -53,8 +53,9 @@ It is possible to add pictures to your posts in markdown. First you need to drop ```jinja {{ figure( img="/blog/img/your-picture-name.avif" - caption="A description of the picture") -}} + caption="A description of the picture" # can be set to an empty string + alt="A picture description for screen readers" # optional, should only be used when leaving the caption empty +) }} ``` This shortcode ensures that images have a consistent look across posts.