From 114b8206a7660fd4a52d93614f55972fd248ce39 Mon Sep 17 00:00:00 2001 From: Noa Santo <72336443+virus-rpi@users.noreply.github.com> Date: Thu, 19 Sep 2024 16:48:31 +0200 Subject: [PATCH 1/2] fix (a11y): mark all external links with the aria-label "(opens in a new tab)" (#821) Co-authored-by: noa.santo --- src/components/legacy/links/links.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/legacy/links/links.tsx b/src/components/legacy/links/links.tsx index 422bfe798..9307bf231 100644 --- a/src/components/legacy/links/links.tsx +++ b/src/components/legacy/links/links.tsx @@ -31,6 +31,7 @@ export const Link = (props: LinkProps): JSX.Element => { target="_blank" rel="noopener" className={className} + aria-label={`${children} (opens in a new tab)`} {...rest} > {children} From e6b777f96b0838a098e0ccf2b67582ab9396fbb1 Mon Sep 17 00:00:00 2001 From: Noa Santo <72336443+virus-rpi@users.noreply.github.com> Date: Thu, 19 Sep 2024 17:28:53 +0200 Subject: [PATCH 2/2] fix (a11y): made code block colors WCAG AA color contrast compliant (#820) Co-authored-by: noa.santo --- src/assets/prism-themes/default.scss | 12 ++++++------ src/assets/prism-themes/prism-theme-nord.scss | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/assets/prism-themes/default.scss b/src/assets/prism-themes/default.scss index d4c4234b9..4011f5c9a 100644 --- a/src/assets/prism-themes/default.scss +++ b/src/assets/prism-themes/default.scss @@ -87,11 +87,11 @@ pre[class*="language-"].line-numbers .line-numbers-rows { .token.prolog, .token.doctype, .token.cdata { - color: slategray; + color: #547290; } .token.punctuation { - color: #999; + color: #95625E; } .token.namespace { @@ -114,7 +114,7 @@ pre[class*="language-"].line-numbers .line-numbers-rows { .token.char, .token.builtin, .token.inserted { - color: #690; + color: #657546; } .token.operator, @@ -130,18 +130,18 @@ pre[class*="language-"].line-numbers .line-numbers-rows { .token.atrule, .token.attr-value, .token.keyword { - color: #07a; + color: #05789E; } .token.function, .token.class-name { - color: #DD4A68; + color: #dd102d; } .token.regex, .token.important, .token.variable { - color: #e90; + color: #9F6105; } .token.important, diff --git a/src/assets/prism-themes/prism-theme-nord.scss b/src/assets/prism-themes/prism-theme-nord.scss index c29a342be..6197f2990 100644 --- a/src/assets/prism-themes/prism-theme-nord.scss +++ b/src/assets/prism-themes/prism-theme-nord.scss @@ -59,7 +59,7 @@ pre[class*="language-"].line-numbers .line-numbers-rows { .token.prolog, .token.doctype, .token.cdata { - color: #636f88; + color: #649CF1; } .token.punctuation { @@ -79,7 +79,7 @@ pre[class*="language-"].line-numbers .line-numbers-rows { } .token.number { - color: #B48EAD; + color: #BF8BB4; } .token.boolean {