Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/components.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe("UI Components", () => {
</IconLink>,
);

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");
Expand All @@ -93,7 +93,7 @@ describe("UI Components", () => {
];

const { getByLabelText } = render(<Social profiles={customProfiles} />);
const btn = getByLabelText("GitHub");
const btn = getByLabelText("GitHub (opens in a new tab)");
expect(btn).toBeInTheDocument();

act(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/icon-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion src/components/publication.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe("PublicationCard", () => {
const { getByLabelText } = render(
<PublicationCard publication={pubWithDoi} />,
);
expect(getByLabelText("DOI")).toBeInTheDocument();
expect(getByLabelText("DOI (opens in a new tab)")).toBeInTheDocument();
}
});

Expand Down
1 change: 1 addition & 0 deletions src/components/section-item-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const SectionItemCard = memo(
<p className="dark:text-primary-dark text-primary">{subtitle}</p>
<p className="text-secondary">{footer}</p>
</div>
<span className="sr-only"> (opens in a new tab)</span>
</a>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/social.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading