From 52f84bf2093d2fd7276cb8c2d7b40e1037c7ed82 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Mon, 15 Jul 2024 13:07:54 -0400 Subject: [PATCH] UI refresh (#38) * refactor: refresh wiki index page * refactor: further wiki index page improvements * fix: semantic markup of wiki article layout * add: better a11y for header icons --- src/components/common/Icon.astro | 7 +- src/components/layout/Header.astro | 6 +- src/content/wiki/faq.mdx | 1 - src/layouts/WikiArticle.astro | 20 +-- src/pages/wiki/index.astro | 236 +++++++++++++++++++++-------- src/scss/main.scss | 1 + 6 files changed, 194 insertions(+), 77 deletions(-) diff --git a/src/components/common/Icon.astro b/src/components/common/Icon.astro index 0ed4edb..7a711fc 100644 --- a/src/components/common/Icon.astro +++ b/src/components/common/Icon.astro @@ -1,10 +1,10 @@ --- const { group, name, class: className, color } = Astro.props; -const displayName = name.replaceAll("-", " "); - const styles = color ? `color: ${color}` : null; +const ariaLabel = Astro.props.ariaLabel ?? name.replaceAll("-", " "); + export interface Props { /** The group that the icon belongs to. */ group: "brands" | "solid"; @@ -14,12 +14,13 @@ export interface Props { class?: string; /** The colour of the icon. */ color?: string; + ariaLabel?: string; } --- diff --git a/src/components/layout/Header.astro b/src/components/layout/Header.astro index f41bd7c..df3af7b 100644 --- a/src/components/layout/Header.astro +++ b/src/components/layout/Header.astro @@ -14,13 +14,13 @@ const { class: className } = Astro.props;