From 03d3ab5790ee84a27f9560b2bebf8ed984cf653e Mon Sep 17 00:00:00 2001 From: KaylaMLe Date: Sun, 17 Mar 2024 23:13:23 -0700 Subject: [PATCH] accessibility edits including alt text, color contrast, and keyboard navigation --- src/App.css | 52 +++++++++----------------------- src/components/Credits.css | 3 ++ src/components/Credits.tsx | 16 +++++++--- src/components/Documentation.tsx | 6 ++-- src/components/Footer.css | 7 +++++ src/components/Footer.tsx | 6 +++- src/components/Home.tsx | 22 +++++++------- src/components/Navbar.css | 13 ++++++++ src/components/Navbar.tsx | 36 ++++++++-------------- 9 files changed, 80 insertions(+), 81 deletions(-) create mode 100644 src/components/Credits.css create mode 100644 src/components/Footer.css create mode 100644 src/components/Navbar.css diff --git a/src/App.css b/src/App.css index baa82cf..e382e80 100644 --- a/src/App.css +++ b/src/App.css @@ -1,50 +1,26 @@ -.App { - text-align: center; -} -html, -body { - overflow-x: hidden; -} - -.grid-container { - display: grid; - grid-template-columns: auto auto auto auto auto; - background-color: #237735; - padding: 10px; -} -.grid-item { - background-color: rgba(207, 253, 189, 0.8); - border: 1px solid rgba(0, 0, 0, 0.8); - padding: 20px; - font-size: 20px; - text-align: center; -} * { box-sizing: border-box; } -.column { - float: left; - width: 33.33%; - padding: 5px; - height: 100px; +@media (prefers-reduced-motion: reduce) { + * { + animation-play-state: paused !important; + transition: none !important; + scroll-behavior: auto !important; + } } -.grid-container { - display: grid; - grid-template-columns: auto auto auto auto auto; - background-color: #55a072; - padding: 10px; +:not(footer *, .profile-btn):focus-visible { + outline: dashed 3px #009CB8 !important; } -.grid-item { - background-color: #55a072; - border: 1px solid #55a072; - padding: 20px; - font-size: 20px; + +.App { text-align: center; } -* { - box-sizing: border-box; + +html, +body { + overflow-x: hidden; } .column { diff --git a/src/components/Credits.css b/src/components/Credits.css new file mode 100644 index 0000000..8bfbaca --- /dev/null +++ b/src/components/Credits.css @@ -0,0 +1,3 @@ +.profile-btn:focus-visible { + outline: dashed 3px #0114DF !important; +} \ No newline at end of file diff --git a/src/components/Credits.tsx b/src/components/Credits.tsx index 6116af2..52f38e9 100644 --- a/src/components/Credits.tsx +++ b/src/components/Credits.tsx @@ -1,4 +1,4 @@ -import { useState, type ReactElement } from 'react'; +import { useState, type ReactElement, useEffect } from 'react'; import JaronImage from './images/jaroon.jpg'; import AliImage from './images/ali.jpg'; import AlanImage from './images/alan.png'; @@ -23,6 +23,7 @@ import JasonImage from './images/json.jpg'; import ThanhImage from './images/thanh.jpeg'; import OmarImage from './images/omar.jpg'; import TonyImage from './images/tony.png'; +import './Credits.css'; import { Accordion, @@ -63,17 +64,17 @@ function CreditElement({ />

{userName}

{userRole}

- + git - + link @@ -422,10 +423,15 @@ function MobileCredits(): ReactElement { * @returns Container with credits components */ export default function Credits(): ReactElement { + useEffect(() => { + document.title = 'Credits - BroncoDirectMe'; + }); + return ( <> {/* Desktop design */} { + document.title = 'Documentation - BroncoDirectMe'; const script = document.createElement('script'); script.src = @@ -27,13 +28,14 @@ function Documentation(): ReactElement { role="flatdoc" className="big-h3 large-brief no-literate documentationElm" > -
+
-

BroncoDirectMe

+

BroncoDirectMe

{/* GitHub buttons: see http://ghbtns.com */} + /> + /> (null); - const handleOpenNavMenu = (event: React.MouseEvent): void => - { setAnchorElNav(event.currentTarget); }; + const handleOpenNavMenu = (event: React.MouseEvent): void => { setAnchorElNav(event.currentTarget); }; const handleCloseNavMenu = (): void => { setAnchorElNav(null); }; return ( - - - + Skip to main content + - + Download + {/* MOBILE VIEW: Dropdown navbar menu */} - - - + BroncoDirectMe - {/* MOBILE VIEW: Icon button and text element */} + {/* DESKTOP VIEW: Icon button and text element */} @@ -141,12 +129,12 @@ export default function Navbar(): ReactElement { href="https://chrome.google.com/webstore/detail/broncodirectme/kcbdmdlehcmkgknmmfjjiaclhpplibda" target="_blank" rel="noopener" + endIcon={} > Download - {/* DESKTOP VIEW: Responsive navbar */}