From bf40197356fc0ff8a09cf8398f7367c521e78d2b Mon Sep 17 00:00:00 2001 From: "noa.santo" Date: Tue, 19 Dec 2023 18:13:43 +0100 Subject: [PATCH 1/6] feat: better screen reader text --- .../pages/landingpage/customers.tsx | 72 ++++++++++++++----- 1 file changed, 56 insertions(+), 16 deletions(-) diff --git a/src/components/pages/landingpage/customers.tsx b/src/components/pages/landingpage/customers.tsx index b7360e43e..459769976 100644 --- a/src/components/pages/landingpage/customers.tsx +++ b/src/components/pages/landingpage/customers.tsx @@ -66,23 +66,63 @@ const CustomerLogo = ({ ); }; +const AriaCustomerLogo = () => { + return ( + + ); +}; + export const Customers = () => { return ( - - - - - - - - - - - - - - - - + <> + + + + + + + + + + + + + + + + + + ); }; From d3a6df82aaf00212639e8f0911d9d5db369e192c Mon Sep 17 00:00:00 2001 From: "noa.santo" Date: Mon, 15 Jan 2024 14:41:39 +0100 Subject: [PATCH 2/6] fix: netlify build error fix --- src/templates/blog-post.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/templates/blog-post.tsx b/src/templates/blog-post.tsx index 5c2262cb2..ef1a8f2be 100644 --- a/src/templates/blog-post.tsx +++ b/src/templates/blog-post.tsx @@ -46,8 +46,10 @@ export const Head = ({ const { author, seoMetaText, title, publicationDate, heroImage } = data.contentfulBlogPost; - const shareImagePath = heroImage.shareImage.resize.src; - + let shareImagePath = ''; + if (heroImage && heroImage.shareImage && heroImage.shareImage.resize) { + shareImagePath = heroImage.shareImage.resize.src; + } /* * SEO Notes: * Recommended meta description length these days is 120 - 158 characters. The lower number is relevant for mobile devices. From 060800bb9c4496939177d72e2eeafa727d90590b Mon Sep 17 00:00:00 2001 From: "noa.santo" Date: Mon, 22 Jan 2024 16:14:56 +0100 Subject: [PATCH 3/6] fix: moved aria-customer-logo inside customer logo container --- .../pages/landingpage/customers.tsx | 42 +++++++------------ 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/src/components/pages/landingpage/customers.tsx b/src/components/pages/landingpage/customers.tsx index 459769976..c8aa9e220 100644 --- a/src/components/pages/landingpage/customers.tsx +++ b/src/components/pages/landingpage/customers.tsx @@ -97,32 +97,22 @@ const AriaCustomerLogo = () => { export const Customers = () => { return ( - <> - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + ); }; From c29095098657b08a9ba2676e929ce970255deeb3 Mon Sep 17 00:00:00 2001 From: "noa.santo" Date: Mon, 22 Jan 2024 16:17:50 +0100 Subject: [PATCH 4/6] chore: add comment to AriaCustomerLogo component --- src/components/pages/landingpage/customers.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/pages/landingpage/customers.tsx b/src/components/pages/landingpage/customers.tsx index c8aa9e220..833a79d8d 100644 --- a/src/components/pages/landingpage/customers.tsx +++ b/src/components/pages/landingpage/customers.tsx @@ -66,6 +66,7 @@ const CustomerLogo = ({ ); }; +// This is a visually hidden list of customers for screen readers const AriaCustomerLogo = () => { return (
    Date: Mon, 22 Jan 2024 17:05:02 +0100 Subject: [PATCH 5/6] chore: ran prettier so test pass --- src/components/layout/seo.tsx | 5 ++--- src/templates/blog-post.tsx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/layout/seo.tsx b/src/components/layout/seo.tsx index d66a79313..87f6320a5 100644 --- a/src/components/layout/seo.tsx +++ b/src/components/layout/seo.tsx @@ -102,9 +102,8 @@ const SEO = ({ * The i18n object (languages, language, originalPath, defaultLanguage) * is replaced with constants and locales data for building the alternate meta tag. */ - const dataNode = locales.edges.find( - (e) => e.node.ns === 'translations', - )?.node; + const dataNode = locales.edges.find((e) => e.node.ns === 'translations') + ?.node; const t = JSON.parse(dataNode?.data || '{}'); const metaDescription = description || t['main.description']; const typeOfSite = siteType || 'website'; diff --git a/src/templates/blog-post.tsx b/src/templates/blog-post.tsx index 7e7131427..2fe08fbaa 100644 --- a/src/templates/blog-post.tsx +++ b/src/templates/blog-post.tsx @@ -47,7 +47,7 @@ export const Head = ({ data.contentfulBlogPost; const shareImagePath = heroImage.shareImage?.resize.src; - + /* * SEO Notes: * Recommended meta description length these days is 120 - 158 characters. The lower number is relevant for mobile devices. From a2fe8dcfca3d2d5c77fa4a5661860bb8da728ab4 Mon Sep 17 00:00:00 2001 From: "noa.santo" Date: Mon, 29 Jan 2024 17:15:21 +0100 Subject: [PATCH 6/6] fix: format fix --- src/components/layout/seo.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/layout/seo.tsx b/src/components/layout/seo.tsx index 87f6320a5..d66a79313 100644 --- a/src/components/layout/seo.tsx +++ b/src/components/layout/seo.tsx @@ -102,8 +102,9 @@ const SEO = ({ * The i18n object (languages, language, originalPath, defaultLanguage) * is replaced with constants and locales data for building the alternate meta tag. */ - const dataNode = locales.edges.find((e) => e.node.ns === 'translations') - ?.node; + const dataNode = locales.edges.find( + (e) => e.node.ns === 'translations', + )?.node; const t = JSON.parse(dataNode?.data || '{}'); const metaDescription = description || t['main.description']; const typeOfSite = siteType || 'website';