From 8d43bf260db999d0e6ce5d176a79ad288e49fed4 Mon Sep 17 00:00:00 2001 From: Amy Date: Fri, 3 Sep 2021 16:40:58 -0400 Subject: [PATCH] Fix accessibility issues for keyboard-only users, and fix some Safari bugs (#268) Also fixed a couple of Safari-specific bugs. Summary: - Added a secondary-accent ring around buttons on focus. (White didn't show up very well against the background.) We can always chat with design about this later if we want to change it. - Fixed the weirdness with tabbing over the headers on the Advice pages. I also made the header flex vertically on mobile screens - this fixes the issue of extra whitespace on the right side, and is also somewhat consistent with the menu-y thing at the top of the mobile Meet the Team page. - I was very tempted to do this on the Events term archive pages as well, but I figured I should get someone else's opinion on that first. - Removed the extra triangle symbol in the MiniEventCard on Safari. I had to use a vendor prefix, but if anyone else can come up with something better, then please do that, thank you. - Stopped the home page "Computer Science Club" from breaking into two lines on small desktop screens. - Added extra space to mobile footer. Closes #250 Closes #248 Closes #253 Closes #256 Closes #261 Co-authored-by: Amy Co-authored-by: Aditya Thakral Reviewed-on: https://git.csclub.uwaterloo.ca/www/www-new/pulls/268 Reviewed-by: Aditya Thakral Co-authored-by: Amy Co-committed-by: Amy --- components/Button.module.css | 10 ++++++++++ components/Footer.module.css | 7 ++++--- components/MiniEventCard.module.css | 8 ++++++++ pages/events/[year]/[term]/index.module.css | 22 ++++++++++++++++++--- pages/index.module.css | 2 ++ pages/resources/advice/co-op.module.css | 12 ++++++++++- 6 files changed, 54 insertions(+), 7 deletions(-) diff --git a/components/Button.module.css b/components/Button.module.css index 93ebcab1..db11799d 100644 --- a/components/Button.module.css +++ b/components/Button.module.css @@ -17,6 +17,16 @@ cursor: pointer; } +.button:focus, +.link:focus { + box-shadow: 0 0 0 calc(4rem / 16) var(--secondary-accent); +} + +.small.button:focus, +.small.link:focus { + box-shadow: 0 0 0 calc(3rem / 16) var(--secondary-accent); +} + .link { text-decoration: none; } diff --git a/components/Footer.module.css b/components/Footer.module.css index 337a419f..b9c378c7 100644 --- a/components/Footer.module.css +++ b/components/Footer.module.css @@ -1,8 +1,7 @@ .footer { box-sizing: border-box; background: var(--primary-heading); - height: calc(66rem / 16); - padding: calc(14rem / 16) 0; + padding: 1rem 0; width: 100%; } @@ -30,12 +29,14 @@ @media only screen and (max-width: calc(768rem / 16)) { .footer { - height: calc(120rem / 16); + padding: 2rem 0; + height: unset; } .container { flex-direction: column-reverse; justify-content: space-around; + gap: 1rem; padding: 0 calc(24rem / 16); } } diff --git a/components/MiniEventCard.module.css b/components/MiniEventCard.module.css index 59e1bbec..e398a611 100644 --- a/components/MiniEventCard.module.css +++ b/components/MiniEventCard.module.css @@ -45,6 +45,14 @@ list-style: none; } +.card > summary::marker { + display: none; +} + +.card > summary::-webkit-details-marker { + display: none; +} + .dropDownIcon { fill: var(--primary-accent); } diff --git a/pages/events/[year]/[term]/index.module.css b/pages/events/[year]/[term]/index.module.css index 65cb415a..22a91b07 100644 --- a/pages/events/[year]/[term]/index.module.css +++ b/pages/events/[year]/[term]/index.module.css @@ -1,9 +1,9 @@ .main { - margin-top: calc(60rem / 16); - margin-bottom: calc(60rem / 16); + margin: calc(60rem / 16) 0; } -.main > h1, .main > section > h1 { +.main > h1, +.main > section > h1 { padding-bottom: calc(16rem / 16); border-bottom: calc(1rem / 16) solid var(--primary-heading); } @@ -34,3 +34,19 @@ .main > .miniEventCards { margin-top: 0; } + +@media only screen and (max-width: calc(768rem / 16)) { + .main { + margin: calc(30rem / 16) 0; + } + + .header { + flex-direction: column; + justify-content: center; + align-items: center; + } + + .header a { + margin: unset; + } +} diff --git a/pages/index.module.css b/pages/index.module.css index 61e6ff52..e260dc8d 100644 --- a/pages/index.module.css +++ b/pages/index.module.css @@ -47,6 +47,7 @@ font-family: "Futura", "sans-serif"; font-size: calc(33rem / 16); text-align: center; + white-space: nowrap; color: var(--primary-heading); } @@ -151,6 +152,7 @@ .clubTitle { margin: calc(8rem / 16) 0; font-size: calc(20rem / 16); + white-space: unset; } .clubDescription { diff --git a/pages/resources/advice/co-op.module.css b/pages/resources/advice/co-op.module.css index 8ee91ad4..b1a0807d 100644 --- a/pages/resources/advice/co-op.module.css +++ b/pages/resources/advice/co-op.module.css @@ -18,7 +18,7 @@ } .adviceBarContainer > a { - padding-right: calc(48rem / 16); + margin-right: calc(48rem / 16); color: var(--text); } @@ -46,6 +46,16 @@ a.currentAdvice { text-align: center; } + .adviceBarContainer { + flex-direction: column; + justify-content: center; + align-items: center; + } + + .adviceBarContainer > a { + margin: unset; + } + .codey { width: calc(140rem / 16); }