From ecddbf955b3a417c432169e9e607eddebb171377 Mon Sep 17 00:00:00 2001 From: Helena Standaert Date: Tue, 26 Mar 2024 13:11:13 +0100 Subject: [PATCH] Optmize accessibility --- src/assets/content/newsItems.ts | 33 ++++++++++------- src/assets/icons/index.ts | 1 + src/assets/icons/linkedin.tsx | 36 +++++++++++++++++++ src/components/Button.tsx | 3 +- src/components/Container.tsx | 6 +++- src/components/Footer.tsx | 46 +++++++++++++++++++++--- src/components/Header.tsx | 6 ++++ src/components/Input.tsx | 12 +++++-- src/components/Layout.tsx | 10 +++++- src/components/Navigation.tsx | 38 +++++++++++--------- src/components/NewsTeaser.tsx | 49 +++++++++++++++++++++----- src/components/Switch.tsx | 27 ++++++++++++-- src/hooks/useForm.ts | 7 +++- src/index.css | 8 +++++ src/pages/Landing/Contact.tsx | 26 ++++++++------ src/pages/Landing/Landing.tsx | 2 +- src/pages/Landing/MissionStatement.tsx | 10 +++++- tailwind.config.js | 4 ++- 18 files changed, 259 insertions(+), 65 deletions(-) create mode 100644 src/assets/icons/linkedin.tsx diff --git a/src/assets/content/newsItems.ts b/src/assets/content/newsItems.ts index cf00818..05aef53 100644 --- a/src/assets/content/newsItems.ts +++ b/src/assets/content/newsItems.ts @@ -1,6 +1,7 @@ export type NewsItem = { key: string; image: string; + altText: string; title: string; summary: string; href: string; @@ -9,38 +10,44 @@ export type NewsItem = { const newsItems: NewsItem[] = [ { key: "0", - title: "Distinguishing between ARIA and native HTML attributes", + title: + "TinyMCE 7 - Revision History, Document Converters, Markdown and more!", summary: - "As a developer, you want to create more inclusive and accessible digital experiences for your users. Great! It’s possible, however, that you might be feeling a bit confused or overwhelmed by the element attributes that can affect the usability for users of assistive technology.", - href: "https://www.deque.com/blog/distinguishing-between-aria-and-native-html-attributes/", + "The latest version of TinyMCE is out and we have several highly requested features including Markdown, Revision History, and Document Converters.", + href: "https://dev.to/tinymce/tinymce-7-revision-history-document-converters-markdown-and-more-551n", image: "https://images.unsplash.com/photo-1556484687-30636164638b?q=80&w=3474&auto=format&fit=crop", + altText: "Hands of multiple people", }, { key: "1", - title: - "Uber Must Pay Wheelchair User $35,000, Provide Accessible Rides: B.C. Human Rights Tribunal", + title: "Accessibility tips from an accessibility engineer", summary: - "It was the first time a ride-hailing app in Canada has been the subject of a human rights tribunal, the ruling said Author of the article:Susan Lazaruk", - href: "https://www.accessibilitynewsinternational.com/uber-must-pay-wheelchair-user-35000-provide-accessible-rides-b-c-human-rights-tribunal/", + "I am a blind accessibility engineer and programmer and I thought I would write an article detailing some of the common things I see in my day job.", + href: "https://dev.to/westbrookc16/accessibility-tips-from-an-accessibility-engineer-4kl8", image: "https://images.unsplash.com/photo-1505243542579-da5adfe8338f?q=80&w=3540&auto=format&fit=crop", + altText: "Two people giving each other a handshake", }, { key: "2", - title: "E-inclusion demo", - summary: "This is a demo of the E-inclusion project.", - href: "", + title: "Using Aria States To Toggle Tailwind Classes", + summary: + "I maintain an internal UI library for a number of large sites. It's got a number of JavaScript interactions for menus, search buttons and similar.", + href: "https://dev.to/endymion1818/using-aria-states-to-toggle-tailwind-classes-1lef", image: "https://images.unsplash.com/photo-1522071820081-009f0129c71c?q=80&w=1740&auto=format&fit=crop", + altText: "A group of people sitting at a table with laptops and notebooks", }, { key: "3", - title: "E-inclusion demo", - summary: "This is a demo of the E-inclusion project.", - href: "", + title: "Responsive design and cross-device testing", + summary: + 'The so-called "browser wars" long before current web standards like HTML 5 made some web developers add badges like "best viewed with Netscape" or "best viewed with Internet Explorer"', + href: "https://dev.to/ingosteinke/responsive-design-and-cross-device-testing-1hoe", image: "https://images.unsplash.com/photo-1476703993599-0035a21b17a9?q=80&w=1740&auto=format&fit=crop", + altText: "A mother with her 2 kids", }, ]; diff --git a/src/assets/icons/index.ts b/src/assets/icons/index.ts index e0f03a6..3ed8716 100644 --- a/src/assets/icons/index.ts +++ b/src/assets/icons/index.ts @@ -1,3 +1,4 @@ export { default as ArrowRight } from "./arrowRight.tsx"; export { default as IcappsLogo } from "./icappsLogo.tsx"; export { default as Exclamation } from "./exclamation.tsx"; +export { default as LinkedIn } from "./linkedin.tsx"; diff --git a/src/assets/icons/linkedin.tsx b/src/assets/icons/linkedin.tsx new file mode 100644 index 0000000..76ffdad --- /dev/null +++ b/src/assets/icons/linkedin.tsx @@ -0,0 +1,36 @@ +import type { SvgIcon } from "./types"; + +function exclamation({ title, width = 24, height = 24, ...props }: SvgIcon) { + return ( + + {title} + + + + + + + ); +} + +export default exclamation; diff --git a/src/components/Button.tsx b/src/components/Button.tsx index b35f830..d984bb6 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -4,7 +4,7 @@ import { twMerge } from "tailwind-merge"; export type ButtonProps = PropsWithChildren & ButtonHTMLAttributes; -function Button({ type = "button", ...props }: ButtonProps) { +function Button({ type = "button", className, ...props }: ButtonProps) { return (