From 3db7702f32dc8b8ae09f00756551a8eac5d8123e Mon Sep 17 00:00:00 2001 From: Marawan Mohamed <40841193+marwan-mohamed12@users.noreply.github.com> Date: Sun, 3 Mar 2024 15:22:49 +0000 Subject: [PATCH 1/4] feat: added the aria-lable for the RSS link --- components/Blog/BlogHeader/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/Blog/BlogHeader/index.tsx b/components/Blog/BlogHeader/index.tsx index 487ad642f8751..bd659ebf9d4b6 100644 --- a/components/Blog/BlogHeader/index.tsx +++ b/components/Blog/BlogHeader/index.tsx @@ -18,12 +18,13 @@ const BlogHeader: FC = ({ category }) => { const currentFile = siteConfig.rssFeeds.find(item => item.category === category)?.file ?? 'blog.xml'; + const ariaLabel = t('layouts.blog.blogHeader.RSS'); return (

{t('layouts.blog.title')} - +

From c62fde0086e710b47fc4f18582bf35cfafda8f52 Mon Sep 17 00:00:00 2001 From: Marawan Mohamed <40841193+marwan-mohamed12@users.noreply.github.com> Date: Sun, 3 Mar 2024 15:24:22 +0000 Subject: [PATCH 2/4] feat: added the translation key for RSS link in blogHeader --- i18n/locales/en.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i18n/locales/en.json b/i18n/locales/en.json index 99ed33782e0dc..569fde6154dea 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -254,6 +254,9 @@ "weekly": "Weekly Updates", "wg": "Working Groups", "events": "Events" + }, + "blogHeader": { + "RSS": "RSS feed" } }, "error": { From bb6137e66e1442974cee2408724546a3602b30f9 Mon Sep 17 00:00:00 2001 From: Marawan Mohamed <40841193+marwan-mohamed12@users.noreply.github.com> Date: Sun, 3 Mar 2024 21:07:32 +0000 Subject: [PATCH 3/4] fix: add subtitles directly to aria-label --- components/Blog/BlogHeader/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/Blog/BlogHeader/index.tsx b/components/Blog/BlogHeader/index.tsx index bd659ebf9d4b6..cea9e38730d83 100644 --- a/components/Blog/BlogHeader/index.tsx +++ b/components/Blog/BlogHeader/index.tsx @@ -18,13 +18,15 @@ const BlogHeader: FC = ({ category }) => { const currentFile = siteConfig.rssFeeds.find(item => item.category === category)?.file ?? 'blog.xml'; - const ariaLabel = t('layouts.blog.blogHeader.RSS'); return (

{t('layouts.blog.title')} - +

From 836ddea68ef96ae9dc09c213aeac26b3ede3b679 Mon Sep 17 00:00:00 2001 From: Marawan Mohamed <40841193+marwan-mohamed12@users.noreply.github.com> Date: Mon, 4 Mar 2024 11:33:46 +0000 Subject: [PATCH 4/4] fix: renamed i18n keys and updated en.json --- components/Blog/BlogHeader/index.tsx | 4 ++-- i18n/locales/en.json | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/components/Blog/BlogHeader/index.tsx b/components/Blog/BlogHeader/index.tsx index cea9e38730d83..11c3bc7ec9376 100644 --- a/components/Blog/BlogHeader/index.tsx +++ b/components/Blog/BlogHeader/index.tsx @@ -25,12 +25,12 @@ const BlogHeader: FC = ({ category }) => { {t('layouts.blog.title')} -

{t('layouts.blog.subtitle')}

+

{t('components.blog.blogHeader.subtitle')}

); }; diff --git a/i18n/locales/en.json b/i18n/locales/en.json index 569fde6154dea..8a61bd8507465 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -224,6 +224,12 @@ "searchPage": { "title": "You're searching: {query}" } + }, + "blog": { + "blogHeader": { + "subtitle": "The latest Node.js news, case studies, tutorials, and resources.", + "rssLink": "RSS feed" + } } }, "layouts": { @@ -237,7 +243,6 @@ }, "blog": { "title": "Blog", - "subtitle": "The latest Node.js news, case studies, tutorials, and resources.", "selectCategory": "Categories", "categories": { "all": "Everything", @@ -254,9 +259,6 @@ "weekly": "Weekly Updates", "wg": "Working Groups", "events": "Events" - }, - "blogHeader": { - "RSS": "RSS feed" } }, "error": {