-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Website: Add Aria Labels and Better Alt Text #754
base: main
Are you sure you want to change the base?
Changes from all commits
e26250d
b824545
e654af2
f2e54e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,12 @@ const RoleDescriptions = () => { | |
{Object.keys(applications).map((application) => { | ||
const { icon } = applications[application]; | ||
return ( | ||
<div className="flex flex-col items-center gap-7" key={application}> | ||
<button | ||
onClick={() => setRole(application)} | ||
aria-label={`Show ${application} questions`} | ||
className="flex flex-col items-center gap-7" | ||
key={application} | ||
> | ||
Comment on lines
+32
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. great, ty for this! |
||
<h3 | ||
className={`lg:text-[24px] lg:leading-[29px] md:text-[18px] md:leading-[22px] | ||
xs:text-[16px] xs:leading-[19px] ${ | ||
|
@@ -38,20 +43,15 @@ const RoleDescriptions = () => { | |
> | ||
{application.charAt(0).toUpperCase() + application.substring(1)} | ||
</h3> | ||
<button | ||
onClick={() => setRole(application)} | ||
aria-label={`Show ${application} questions`} | ||
> | ||
<Image | ||
src={icon.src} | ||
alt="" | ||
width={icon.width} | ||
height={icon.height} | ||
className={`${role === application ? '' : 'brightness-50'} | ||
<Image | ||
src={icon.src} | ||
alt="" | ||
width={icon.width} | ||
height={icon.height} | ||
className={`${role === application ? '' : 'brightness-50'} | ||
lg:h-[90px] md:h-[73px] xs:h-[44px] w-auto`} | ||
/> | ||
</button> | ||
</div> | ||
/> | ||
</button> | ||
); | ||
})} | ||
</div> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,22 +13,22 @@ const Bottom: React.FC = () => ( | |
src="/images/teaching_1.svg" | ||
width={292} | ||
height={441} | ||
alt="teaching 1" | ||
alt="teacher presenting slide on ReactJS" | ||
/> | ||
<div className="flex flex-col h-full w-7/12 gap-y-16"> | ||
<Image | ||
className="w-11/12 self-end" | ||
src="/images/teaching_2.svg" | ||
width={276} | ||
height={179} | ||
alt="teachine 2" | ||
alt="teacher lecturing in front of architecture diagram" | ||
/> | ||
<Image | ||
className="w-3/4 self-end" | ||
src="/images/teaching_3.svg" | ||
width={276} | ||
height={179} | ||
alt="teachine 3" | ||
alt="students in front of sticky note board" | ||
/> | ||
</div> | ||
</div> | ||
|
@@ -46,7 +46,7 @@ const Bottom: React.FC = () => ( | |
src="/icons/new_trends.svg" | ||
width={58} | ||
height={58} | ||
alt="Trends icon" | ||
alt="Laptop icon" | ||
/> | ||
<div className="flex flex-col justify-start w-full items-start"> | ||
<h6 className="text-left w-full font-bold md:text-sm lg:text-[22px]"> | ||
|
@@ -63,7 +63,7 @@ const Bottom: React.FC = () => ( | |
src="/icons/propel_icon.svg" | ||
width={58} | ||
height={63} | ||
alt="Propel icon" | ||
alt="rocket ship icon" | ||
/> | ||
<div className="flex flex-col justify-start w-full items-start md:text-xs"> | ||
<h6 className="text-left w-full font-bold md:text-sm lg:text-[22px]">Propel</h6> | ||
|
@@ -72,7 +72,7 @@ const Bottom: React.FC = () => ( | |
</p> | ||
</div> | ||
</div> | ||
<Link href="/course" className="primary-button"> | ||
<Link href="/course" className="primary-button" aria-label="Courses page"> | ||
Learn more | ||
</Link> | ||
</div> | ||
|
@@ -85,22 +85,22 @@ const Bottom: React.FC = () => ( | |
src="/images/outreach_1.svg" | ||
width={275} | ||
height={143} | ||
alt="outreach 1" | ||
alt="kids stacking boxes at make-a-thon" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some of my suggestions (feel free to edit as u see fit): |
||
/> | ||
<div className="flex flex-row gap-x-10 w-full h-3/4"> | ||
<Image | ||
className="w-1/2 self-end" | ||
src="/images/outreach_3.svg" | ||
width={154} | ||
height={104} | ||
alt="outreach 3" | ||
alt="kids being mentored by DTI member" | ||
/> | ||
<Image | ||
className="w-1/3 self-start" | ||
src="/images/outreach_2.svg" | ||
width={115} | ||
height={103} | ||
alt="outreach 2" | ||
alt="students learning Figma from DTI members" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yess ty for this |
||
/> | ||
</div> | ||
</div> | ||
|
@@ -128,8 +128,8 @@ const Bottom: React.FC = () => ( | |
src="/images/team.svg" | ||
width={377} | ||
height={286} | ||
alt="team" | ||
></Image> | ||
alt="team photo of DTI members" | ||
/> | ||
<div className="text-left w-full flex flex-col gap-y-3 md:self-center md:gap-y-5 max-w-[389px]"> | ||
<div className="flex flex-col gap-y-1 md:gap-y-2"> | ||
<p className="text-neutral-200 text-xs font-bold uppercase lg:text-lg">team</p> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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={`${isOpen ? 'Minimize' : 'Expand'} ${title} student project`} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yessss awesome |
||
> | ||
<div className="flex justify-between items-center"> | ||
<h3 className={`md:text-3xl text-xl font-bold ${isOpen ? 'text-white' : 'text-black'}`}> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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, | ||
Comment on lines
+13
to
14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤩 ty! |
||
"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 | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,6 +189,7 @@ export const MemberDetails: React.FC<MemberDetailsProps> = (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}`} | ||
> | ||
<Image | ||
src="/icons/red_calendar.svg" | ||
|
@@ -211,11 +212,13 @@ export const MemberDetails: React.FC<MemberDetailsProps> = (props: MemberDetails | |
</button> | ||
</div> | ||
<div className="md:hidden xs:block"> | ||
<button | ||
<Link | ||
href={props.coffeeChatLink ?? `mailto:${props.email}`} | ||
onMouseEnter={mouseHandler} | ||
onMouseLeave={mouseHandler} | ||
className="py-3 px-5 bg-white rounded-xl text-[#A52424] border-[3px] border-[#A52424] | ||
hover:bg-[#A52424] hover:text-white stroke-white w-full flex justify-center" | ||
aria-label={`schedule coffee chat with ${props.firstName} ${props.lastName}`} | ||
> | ||
<div className="flex gap-3 w-max"> | ||
<Image | ||
|
@@ -227,7 +230,7 @@ export const MemberDetails: React.FC<MemberDetailsProps> = (props: MemberDetails | |
/> | ||
<p className="font-bold text-base text-inherit whitespace-nowrap">Chat with me</p> | ||
</div> | ||
</button> | ||
</Link> | ||
</div> | ||
</Card> | ||
); | ||
|
@@ -310,7 +313,11 @@ const MemberGroup: React.FC<MemberGroupProps> = ({ | |
<div className="flex flex-row justify-center flex-wrap gap-x-14 gap-y-10"> | ||
{members.map((member, index) => ( | ||
<> | ||
<button onClick={() => onMemberCardClick(member)} className="memberCard"> | ||
<button | ||
onClick={() => onMemberCardClick(member)} | ||
className="memberCard" | ||
aria-label={`open ${member.firstName} ${member.lastName}'s details`} | ||
> | ||
<MemberCard | ||
{...member} | ||
key={member.netid} | ||
|
@@ -343,7 +350,11 @@ const MemberGroup: React.FC<MemberGroupProps> = ({ | |
> | ||
{members.map((member, index) => ( | ||
<> | ||
<button onClick={() => onMemberCardClick(member)} className="memberCard"> | ||
<button | ||
onClick={() => onMemberCardClick(member)} | ||
className="memberCard" | ||
aria-label={`open ${member.firstName} ${member.lastName}'s details`} | ||
> | ||
Comment on lines
+355
to
+357
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes yes yes ty for this! |
||
<MemberCard | ||
{...member} | ||
key={member.netid} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yay for aria labels!
Just a small nit i found when testing – do you think we could make the
<button>
wrap the label as well ("Design", "Business", etc.)? That way you can click on the entire container (label + icon).It's just a smol polish thing that could increase the tap target and make it easier to select the tabs