diff --git a/src/components/components.test.tsx b/src/components/components.test.tsx index 8357621..10682e9 100644 --- a/src/components/components.test.tsx +++ b/src/components/components.test.tsx @@ -78,7 +78,7 @@ describe("UI Components", () => { , ); - const link = getByLabelText("My Title"); + const link = getByLabelText("My Title (opens in a new tab)"); expect(link).toBeInTheDocument(); expect(link.getAttribute("href")).toBe("https://example.com"); expect(link.getAttribute("target")).toBe("_blank"); @@ -93,7 +93,7 @@ describe("UI Components", () => { ]; const { getByLabelText } = render(); - const btn = getByLabelText("GitHub"); + const btn = getByLabelText("GitHub (opens in a new tab)"); expect(btn).toBeInTheDocument(); act(() => { diff --git a/src/components/icon-link.tsx b/src/components/icon-link.tsx index fec5e6c..ed2a69e 100644 --- a/src/components/icon-link.tsx +++ b/src/components/icon-link.tsx @@ -17,7 +17,7 @@ export const IconLink = ({ href, title, children }: IconLinkProps) => ( href={href} target="_blank" rel="noopener noreferrer" - aria-label={title} + aria-label={`${title} (opens in a new tab)`} className="icon-link" > {children} diff --git a/src/components/publication.test.tsx b/src/components/publication.test.tsx index c871c39..9870bd3 100644 --- a/src/components/publication.test.tsx +++ b/src/components/publication.test.tsx @@ -34,7 +34,7 @@ describe("PublicationCard", () => { const { getByLabelText } = render( , ); - expect(getByLabelText("DOI")).toBeInTheDocument(); + expect(getByLabelText("DOI (opens in a new tab)")).toBeInTheDocument(); } }); diff --git a/src/components/section-item-card.tsx b/src/components/section-item-card.tsx index fc9217f..91382d8 100644 --- a/src/components/section-item-card.tsx +++ b/src/components/section-item-card.tsx @@ -31,6 +31,7 @@ export const SectionItemCard = memo(

{subtitle}

{footer}

+ (opens in a new tab) ); diff --git a/src/components/social.tsx b/src/components/social.tsx index 83c0e03..ac4d2a9 100644 --- a/src/components/social.tsx +++ b/src/components/social.tsx @@ -16,7 +16,7 @@ const Social = ({ profiles: propsProfiles }: { profiles?: Profile[] }) => { variant="ghost" size="lg" isIconOnly - aria-label={profile.name} + aria-label={`${profile.name} (opens in a new tab)`} className="text-slate-500 hover:text-primary rounded-full text-2xl" onPress={() => window.open(profile.link, "_blank", "noopener,noreferrer")