Skip to content

Commit

Permalink
fix: accessibility issue for timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mwskwong committed Dec 27, 2024
1 parent d806071 commit cdc69af
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/app/education/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const EducationPage = async () => {
media={supportingDocuments}
organization={school}
title={program}
titleAs="h2"
{...education}
/>
),
Expand Down
2 changes: 1 addition & 1 deletion src/app/experience/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const ExperiencePage = async () => {
{experiences.map(
({
id,

jobTitle,
company,
jobDuties,
Expand All @@ -59,6 +58,7 @@ const ExperiencePage = async () => {
organization={company}
tags={skills}
title={jobTitle}
titleAs="h2"
{...experience}
/>
),
Expand Down
5 changes: 4 additions & 1 deletion src/components/timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Grid,
type GridProps,
Heading,
type HeadingProps,
Inset,
Link,
Text,
Expand Down Expand Up @@ -38,6 +39,7 @@ export interface ItemProps extends Omit<GridProps, 'children'> {
thumbnail?: string | StaticImageData;
}[];
tags?: { name: string; url?: string }[];
titleAs?: HeadingProps['as'];
}

export const Item: FC<ItemProps> = ({
Expand All @@ -48,6 +50,7 @@ export const Item: FC<ItemProps> = ({
descriptions = [],
media = [],
tags = [],
titleAs = 'h3',
...props
}) => {
const duration = to
Expand All @@ -66,7 +69,7 @@ export const Item: FC<ItemProps> = ({
</Text>
<Flex className="sm:col-span-3" direction="column" gap="4">
<Flex align="start" direction="column" gap="2">
<Heading as="h3" size="4">
<Heading as={titleAs} size="4">
{title}
</Heading>
<Link href={organization?.url} rel="noopener" target="_blank">
Expand Down

0 comments on commit cdc69af

Please sign in to comment.