feat: update links for improved accessibility

This commit is contained in:
Amruth Pillai
2026-05-26 13:09:30 +02:00
parent dd1e37e579
commit 8da780c868
43 changed files with 952 additions and 189 deletions
@@ -35,12 +35,12 @@ const renderButton = () =>
);
describe("GithubStarsButton", () => {
it("renders an anchor pointing at the project repo with rel=noopener and target=_blank", () => {
it("renders an anchor pointing at the project repo with rel=noopener noreferrer and target=_blank", () => {
renderButton();
const link = screen.getByRole("button") as HTMLAnchorElement;
expect(link.href).toBe("https://github.com/amruthpillai/reactive-resume");
expect(link.target).toBe("_blank");
expect(link.rel).toBe("noopener");
expect(link.rel).toBe("noopener noreferrer");
});
it("uses the no-count aria-label when star count hasn't loaded yet", () => {
@@ -18,7 +18,12 @@ export function GithubStarsButton() {
variant="outline"
nativeButton={false}
render={
<a target="_blank" href="https://github.com/amruthpillai/reactive-resume" aria-label={ariaLabel} rel="noopener">
<a
target="_blank"
href="https://github.com/amruthpillai/reactive-resume"
aria-label={ariaLabel}
rel="noopener noreferrer"
>
<GithubLogoIcon aria-hidden="true" />
{starCount != null ? (
<CountUp to={starCount} duration={0.5} separator="," className="font-bold" aria-hidden="true" />