From e26250d60a65180878ce9473e4f052346d33e923 Mon Sep 17 00:00:00 2001 From: Andrew Chen Date: Fri, 29 Nov 2024 01:45:48 -0500 Subject: [PATCH 1/3] New Website: Add Aria Labels and Better Alt Text --- .../components/apply/ApplicationTimeline.tsx | 4 ++-- new-dti-website/components/apply/ApplyFAQ.tsx | 1 + new-dti-website/components/bottom.tsx | 22 +++++++++---------- .../components/course/DDProjects.tsx | 1 + .../components/sponsor/SponsorshipTable.tsx | 2 +- .../components/team/MemberDisplay.tsx | 1 + .../components/team/MemberGroup.tsx | 19 ++++++++++++---- new-dti-website/components/team/TeamHero.tsx | 9 ++++---- new-dti-website/src/app/course/page.tsx | 3 ++- new-dti-website/src/app/page.tsx | 3 ++- new-dti-website/src/app/sponsor/page.tsx | 2 +- 11 files changed, 42 insertions(+), 25 deletions(-) diff --git a/new-dti-website/components/apply/ApplicationTimeline.tsx b/new-dti-website/components/apply/ApplicationTimeline.tsx index bd8eea46..8cd3bb2b 100644 --- a/new-dti-website/components/apply/ApplicationTimeline.tsx +++ b/new-dti-website/components/apply/ApplicationTimeline.tsx @@ -12,11 +12,10 @@ import { extractEndDate, extractEndTime, parseDate } from '../../src/utils/dateU type TabProps = { isSelected: boolean; text: string; - tabIndex?: number; onClick?: () => void; }; -const Tab: React.FC = ({ isSelected, text, onClick, tabIndex }) => ( +const Tab: React.FC = ({ isSelected, text, onClick }) => ( diff --git a/new-dti-website/components/bottom.tsx b/new-dti-website/components/bottom.tsx index 131f30c4..df93192c 100644 --- a/new-dti-website/components/bottom.tsx +++ b/new-dti-website/components/bottom.tsx @@ -13,7 +13,7 @@ const Bottom: React.FC = () => ( src="/images/teaching_1.svg" width={292} height={441} - alt="teaching 1" + alt="teacher presenting slide on ReactJS" />
( src="/images/teaching_2.svg" width={276} height={179} - alt="teachine 2" + alt="teacher lecturing in front of architecture diagram" /> teachine 3
@@ -46,7 +46,7 @@ const Bottom: React.FC = () => ( src="/icons/new_trends.svg" width={58} height={58} - alt="Trends icon" + alt="Laptop icon" />
@@ -63,7 +63,7 @@ const Bottom: React.FC = () => ( src="/icons/propel_icon.svg" width={58} height={63} - alt="Propel icon" + alt="rocket ship icon" />
Propel
@@ -72,7 +72,7 @@ const Bottom: React.FC = () => (

- + Learn more @@ -85,7 +85,7 @@ const Bottom: React.FC = () => ( src="/images/outreach_1.svg" width={275} height={143} - alt="outreach 1" + alt="kids stacking boxes at make-a-thon" />
( src="/images/outreach_3.svg" width={154} height={104} - alt="outreach 3" + alt="kids being mentored by DTI member" /> outreach 2
@@ -128,8 +128,8 @@ const Bottom: React.FC = () => ( src="/images/team.svg" width={377} height={286} - alt="team" - > + alt="team photo" + />

team

diff --git a/new-dti-website/components/course/DDProjects.tsx b/new-dti-website/components/course/DDProjects.tsx index 992980e7..996dc155 100644 --- a/new-dti-website/components/course/DDProjects.tsx +++ b/new-dti-website/components/course/DDProjects.tsx @@ -35,6 +35,7 @@ export default function DDProjects({ title, description, imageSrc }: DDProjectsP isOpen ? 'bg-red-500' : 'bg-white' } w-full max-w-8xl rounded-xl drop-shadow-sm px-10 py-8 border-1 border-[#E4E4E4]`} onClick={toggleCard} + aria-label="toggle card" >

diff --git a/new-dti-website/components/sponsor/SponsorshipTable.tsx b/new-dti-website/components/sponsor/SponsorshipTable.tsx index 091065dc..e54d661a 100644 --- a/new-dti-website/components/sponsor/SponsorshipTable.tsx +++ b/new-dti-website/components/sponsor/SponsorshipTable.tsx @@ -96,7 +96,7 @@ const SponsorshipTableLaptop = () => ( key={`${benefit.key}-${tier}`} > {tiers.indexOf(tier) >= tiers.indexOf(benefit.lowestTier) && ( - check + checkmark )}

))} diff --git a/new-dti-website/components/team/MemberDisplay.tsx b/new-dti-website/components/team/MemberDisplay.tsx index fb3fc928..1ec8f2c8 100644 --- a/new-dti-website/components/team/MemberDisplay.tsx +++ b/new-dti-website/components/team/MemberDisplay.tsx @@ -75,6 +75,7 @@ const MemberDisplay: React.FC = () => { setSelectedRole(role.altText); setSelectedMember(undefined); }} + aria-label={`select ${role.altText} role`} > = (props: MemberDetails onMouseLeave={mouseHandler} className="flex items-center justify-center gap-3 py-3 px-5 bg-white rounded-xl text-[#A52424] border-[3px] border-[#A52424] hover:bg-[#A52424] hover:text-white stroke-white w-max" + aria-label={`schedule coffee chat with ${props.firstName} ${props.lastName}`} > = (props: MemberDetails
- +
); @@ -310,7 +313,11 @@ const MemberGroup: React.FC = ({
{members.map((member, index) => ( <> - { className="flex justify-center relative bottom-2 cursor-pointer" style={{ pointerEvents: 'none' }} > - frame +

{`${carouselImages.images[carouselIndex % carouselLength].alt}.jpg`} @@ -204,13 +204,14 @@ const TeamHero = () => { onClick={() => setModalShown(index === carouselIndex && width >= TABLET_BREAKPOINT) } + aria-label="open modal" >

{image.alt}
icon @@ -142,6 +142,7 @@ export default function Courses() { key="Trends Website" href={config.trendsWebsiteLink} className="primary-button" + aria-label="Trends Website" > Learn More diff --git a/new-dti-website/src/app/page.tsx b/new-dti-website/src/app/page.tsx index 6e31b6b0..87b90f97 100644 --- a/new-dti-website/src/app/page.tsx +++ b/new-dti-website/src/app/page.tsx @@ -137,9 +137,10 @@ const Home: React.FC = () => { onClick={scrollToContent} className={`text-white md:text-lg xs:text-[16px] font-semibold cursor-pointer flex flex-col items-center z-10 ${ibm_plex_mono.className}`} style={{ transition: 'all 0.3s ease' }} + aria-label="scroll down" > LEARN MORE - Learn more +
diff --git a/new-dti-website/src/app/sponsor/page.tsx b/new-dti-website/src/app/sponsor/page.tsx index da9318b1..7e3f7e22 100644 --- a/new-dti-website/src/app/sponsor/page.tsx +++ b/new-dti-website/src/app/sponsor/page.tsx @@ -89,7 +89,7 @@ const SponsorPage = () => {
DTI 2024= LAPTOP_BREAKPOINT ? 475 : 350} height={width >= LAPTOP_BREAKPOINT ? 320 : 236} className="rounded-3xl object-cover md:w-5/12" From b824545a23d83f2febae50b165f56b8ae9b0705e Mon Sep 17 00:00:00 2001 From: Andrew Chen Date: Sat, 30 Nov 2024 01:33:23 -0500 Subject: [PATCH 2/3] Make Label Clickable with Rest of Icon --- .../components/apply/RoleDescription.tsx | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/new-dti-website/components/apply/RoleDescription.tsx b/new-dti-website/components/apply/RoleDescription.tsx index f749e18b..7e271116 100644 --- a/new-dti-website/components/apply/RoleDescription.tsx +++ b/new-dti-website/components/apply/RoleDescription.tsx @@ -29,7 +29,12 @@ const RoleDescriptions = () => { {Object.keys(applications).map((application) => { const { icon } = applications[application]; return ( -
+ -
+ /> + ); })}
From e654af2cd387212fcfc14257e5bd5f7f631dd889 Mon Sep 17 00:00:00 2001 From: Andrew Chen Date: Sat, 30 Nov 2024 01:49:10 -0500 Subject: [PATCH 3/3] Update Alt text on DDprojects and initiatives page images, Fix spelling of dac (was named dcc before) --- new-dti-website/components/bottom.tsx | 2 +- .../components/course/DDProjects.tsx | 2 +- .../initiatives/data/initiatives.json | 8 ++++---- .../components/products/products.json | 16 ++++++++-------- .../products/{dcc/dcc1.png => dac/dac1.png} | Bin .../products/{dcc/dcc2.png => dac/dac2.png} | Bin .../products/{dcc/dcc3.png => dac/dac3.png} | Bin .../products/{dcc/dcc4.png => dac/dac4.png} | Bin 8 files changed, 14 insertions(+), 14 deletions(-) rename new-dti-website/public/images/products/{dcc/dcc1.png => dac/dac1.png} (100%) rename new-dti-website/public/images/products/{dcc/dcc2.png => dac/dac2.png} (100%) rename new-dti-website/public/images/products/{dcc/dcc3.png => dac/dac3.png} (100%) rename new-dti-website/public/images/products/{dcc/dcc4.png => dac/dac4.png} (100%) diff --git a/new-dti-website/components/bottom.tsx b/new-dti-website/components/bottom.tsx index df93192c..395b7d69 100644 --- a/new-dti-website/components/bottom.tsx +++ b/new-dti-website/components/bottom.tsx @@ -128,7 +128,7 @@ const Bottom: React.FC = () => ( src="/images/team.svg" width={377} height={286} - alt="team photo" + alt="team photo of DTI members" />
diff --git a/new-dti-website/components/course/DDProjects.tsx b/new-dti-website/components/course/DDProjects.tsx index 996dc155..70129294 100644 --- a/new-dti-website/components/course/DDProjects.tsx +++ b/new-dti-website/components/course/DDProjects.tsx @@ -35,7 +35,7 @@ export default function DDProjects({ title, description, imageSrc }: DDProjectsP isOpen ? 'bg-red-500' : 'bg-white' } w-full max-w-8xl rounded-xl drop-shadow-sm px-10 py-8 border-1 border-[#E4E4E4]`} onClick={toggleCard} - aria-label="toggle card" + aria-label={`${isOpen ? 'Minimize' : 'Expand'} ${title} student project`} >

diff --git a/new-dti-website/components/initiatives/data/initiatives.json b/new-dti-website/components/initiatives/data/initiatives.json index 79090203..4068883d 100644 --- a/new-dti-website/components/initiatives/data/initiatives.json +++ b/new-dti-website/components/initiatives/data/initiatives.json @@ -10,7 +10,7 @@ }, "image": { "src": "/images/tcpl.jpg", - "alt": "tcpl", + "alt": "a DTI member teaching members of the Ithaca community about technology at the Tompkins County Public Library", "width": 563, "height": 328 }, @@ -30,7 +30,7 @@ }, "image": { "src": "/images/half-baked.jpg", - "alt": "half-baked", + "alt": "a DTI member presenting a series of graphs at the Half-Baked event", "width": 373, "height": 263 }, @@ -49,7 +49,7 @@ }, "image": { "src": "/images/bigredhacks.jpg", - "alt": "bigredhacks", + "alt": "a DTI member presenting code at the Big Red Hacks hackathon event", "width": 344, "height": 263 }, @@ -68,7 +68,7 @@ }, "image": { "src": "/images/millennium.jpg", - "alt": "millennium", + "alt": "DTI members posing in front of the Millennium logo", "width": 345, "height": 260 }, diff --git a/new-dti-website/components/products/products.json b/new-dti-website/components/products/products.json index 815e7abf..79bf6634 100644 --- a/new-dti-website/components/products/products.json +++ b/new-dti-website/components/products/products.json @@ -128,20 +128,20 @@ ], "images": [ { - "src": "/images/products/dcc/dcc1.png", - "alt": "DCC Image 1" + "src": "/images/products/dac/dac1.png", + "alt": "DAC Image 1" }, { - "src": "/images/products/dcc/dcc2.png", - "alt": "DCC Image 2", + "src": "/images/products/dac/dac2.png", + "alt": "DAC Image 2", "top": "50%", "left": "-7%", "width": "47%", "direction": "down" }, { - "src": "/images/products/dcc/dcc3.png", - "alt": "DCC Image 3", + "src": "/images/products/dac/dac3.png", + "alt": "DAC Image 3", "bottom": "11%", "right": "-10%", "width": "62%", @@ -149,8 +149,8 @@ "delay": true }, { - "src": "/images/products/dcc/dcc4.png", - "alt": "DCC Image 4", + "src": "/images/products/dac/dac4.png", + "alt": "DAC Image 4", "top": "9%", "right": "-18%", "width": "45%", diff --git a/new-dti-website/public/images/products/dcc/dcc1.png b/new-dti-website/public/images/products/dac/dac1.png similarity index 100% rename from new-dti-website/public/images/products/dcc/dcc1.png rename to new-dti-website/public/images/products/dac/dac1.png diff --git a/new-dti-website/public/images/products/dcc/dcc2.png b/new-dti-website/public/images/products/dac/dac2.png similarity index 100% rename from new-dti-website/public/images/products/dcc/dcc2.png rename to new-dti-website/public/images/products/dac/dac2.png diff --git a/new-dti-website/public/images/products/dcc/dcc3.png b/new-dti-website/public/images/products/dac/dac3.png similarity index 100% rename from new-dti-website/public/images/products/dcc/dcc3.png rename to new-dti-website/public/images/products/dac/dac3.png diff --git a/new-dti-website/public/images/products/dcc/dcc4.png b/new-dti-website/public/images/products/dac/dac4.png similarity index 100% rename from new-dti-website/public/images/products/dcc/dcc4.png rename to new-dti-website/public/images/products/dac/dac4.png