From 8c9066d2b28ed466fc27e69cde5c030569f1d71c Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Sat, 16 Jul 2022 09:54:51 +0100 Subject: [PATCH] fix(a11y): color preview fields have no aria label Signed-off-by: Sami Mazouz --- .../admin/components/{AppearancePage.js => AppearancePage.tsx} | 2 ++ framework/core/locale/core.yml | 2 ++ 2 files changed, 4 insertions(+) rename framework/core/js/src/admin/components/{AppearancePage.js => AppearancePage.tsx} (95%) diff --git a/framework/core/js/src/admin/components/AppearancePage.js b/framework/core/js/src/admin/components/AppearancePage.tsx similarity index 95% rename from framework/core/js/src/admin/components/AppearancePage.js rename to framework/core/js/src/admin/components/AppearancePage.tsx index 0550f3841a..02aede4bab 100644 --- a/framework/core/js/src/admin/components/AppearancePage.js +++ b/framework/core/js/src/admin/components/AppearancePage.tsx @@ -88,11 +88,13 @@ export default class AppearancePage extends AdminPage { type: 'color-preview', setting: 'theme_primary_color', placeholder: '#aaaaaa', + ariaLabel: app.translator.trans('core.admin.appearance.colors_primary_label'), })} {this.buildSettingComponent({ type: 'color-preview', setting: 'theme_secondary_color', placeholder: '#aaaaaa', + ariaLabel: app.translator.trans('core.admin.appearance.colors_secondary_label'), })} , 70 diff --git a/framework/core/locale/core.yml b/framework/core/locale/core.yml index 29d407a380..601422c6f4 100644 --- a/framework/core/locale/core.yml +++ b/framework/core/locale/core.yml @@ -11,6 +11,8 @@ core: appearance: colored_header_label: Colored Header colors_heading: Colors + colors_primary_label: Primary Color + colors_secondary_label: Secondary Color colors_text: "Choose two colors to theme your forum with. The first will be used as a highlight color, while the second will be used to style background elements." custom_footer_heading: Custom Footer custom_footer_text: => core.ref.custom_footer_text