From c51559dee56cbafe325e509585aceeac783f81c7 Mon Sep 17 00:00:00 2001
From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com>
Date: Mon, 3 Nov 2025 10:28:54 +0800
Subject: [PATCH 1/2] fix(a11y): create disable_images button only when layout
is background
---
layouts/partials/header/basic.html | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/layouts/partials/header/basic.html b/layouts/partials/header/basic.html
index b8d3e7d9..b4fb3fe6 100644
--- a/layouts/partials/header/basic.html
+++ b/layouts/partials/header/basic.html
@@ -200,11 +200,20 @@
{{ $toggles := slice }}
{{ $shouldDisableBlur := or site.Params.homepage.layoutBackgroundBlur site.Params.article.layoutBackgroundBlur site.Params.list.layoutBackgroundBlur }}
+ {{ $shouldDisableBackgroundImage := or
+ (eq site.Params.homepage.layout "background")
+ (eq site.Params.article.heroStyle "background")
+ (eq site.Params.list.heroStyle "background")
+ (eq site.Params.taxonomy.heroStyle "background")
+ (eq site.Params.term.heroStyle "background")
+ }}
{{ if $shouldDisableBlur }}
{{ $toggles = $toggles | append (dict "id" (print $prefix "disable-blur") "label" (i18n "a11y.disable_blur")) }}
{{ end }}
+ {{ if $shouldDisableBackgroundImage }}
+ {{ $toggles = $toggles | append (dict "id" (print $prefix "disable-images") "label" (i18n "a11y.disable_images")) }}
+ {{ end }}
{{- $toggles = $toggles | append
- (dict "id" (print $prefix "disable-images") "label" (i18n "a11y.disable_images"))
(dict "id" (print $prefix "underline-links") "label" (i18n "a11y.show_link_underline"))
(dict "id" (print $prefix "zen-mode") "label" (i18n "article.zen_mode_title.enable"))
-}}
From 7f55de67d486fcf5adf876b2e5e9cba5cdc125d4 Mon Sep 17 00:00:00 2001
From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com>
Date: Mon, 3 Nov 2025 10:30:33 +0800
Subject: [PATCH 2/2] fix(a11y): i18n "Disable images" -> "Disable background
image"
---
i18n/en.yaml | 2 +-
i18n/ja.yaml | 2 +-
i18n/zh-CN.yaml | 2 +-
i18n/zh-TW.yaml | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/i18n/en.yaml b/i18n/en.yaml
index 1dd03da5..bb444cd1 100644
--- a/i18n/en.yaml
+++ b/i18n/en.yaml
@@ -32,7 +32,7 @@ article:
a11y:
title: "Accessibility settings"
disable_blur: "Disable blur"
- disable_images: "Disable images"
+ disable_images: "Disable background image"
show_link_underline: "Show link underline"
font_size: "Font size"
diff --git a/i18n/ja.yaml b/i18n/ja.yaml
index de6ddcce..e2597284 100644
--- a/i18n/ja.yaml
+++ b/i18n/ja.yaml
@@ -32,7 +32,7 @@ article:
a11y:
title: "アクセシビリティ設定"
disable_blur: "ぼかしを無効にする"
- disable_images: "画像を無効にする"
+ disable_images: "背景画像を無効にする"
show_link_underline: "リンクの下線を表示する"
font_size: "フォントサイズ"
diff --git a/i18n/zh-CN.yaml b/i18n/zh-CN.yaml
index 3bf806eb..9f4f76fa 100644
--- a/i18n/zh-CN.yaml
+++ b/i18n/zh-CN.yaml
@@ -32,7 +32,7 @@ article:
a11y:
title: "无障碍设定"
disable_blur: "禁用模糊效果"
- disable_images: "禁用图片"
+ disable_images: "禁用背景图片"
show_link_underline: "显示链接下划线"
font_size: "字体大小"
diff --git a/i18n/zh-TW.yaml b/i18n/zh-TW.yaml
index ae19c246..4e2b32cc 100644
--- a/i18n/zh-TW.yaml
+++ b/i18n/zh-TW.yaml
@@ -31,8 +31,8 @@ article:
a11y:
title: "無障礙設定"
- disable_blur: "停用模糊效果"
- disable_images: "停用圖片"
+ disable_blur: "停用背景模糊"
+ disable_images: "移除背景圖片"
show_link_underline: "顯示連結底線"
font_size: "字體大小"