Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

fix: ensure Atlas Cloud sponsor logo links to website (#3170)

Amruth Pillai56c90947e441
diff --git a/apps/web/src/routes/_home/-sections/sponsors.test.tsx b/apps/web/src/routes/_home/-sections/sponsors.test.tsx
index 945c3a43e..8fa0da758 100644
--- a/apps/web/src/routes/_home/-sections/sponsors.test.tsx
+++ b/apps/web/src/routes/_home/-sections/sponsors.test.tsx
@@ -33,12 +33,19 @@ describe("Sponsors", () => {
expect(link).toHaveAttribute("rel", "noopener noreferrer");
});
- it("renders the full Atlas Cloud logo", () => {
- const { getByAltText } = renderSponsors(true);
+ it("renders the full Atlas Cloud logo inside the sponsor link", () => {
+ const { container, getByRole } = renderSponsors(true);
- const logo = getByAltText("Atlas Cloud");
- expect(logo).toHaveAttribute("src", "/sponsors/atlas-cloud-logo-black.svg");
- expect(logo).toHaveClass("h-20");
+ const link = getByRole("link", { name: "Atlas Cloud" });
+ const logos = container.querySelectorAll("a[aria-label='Atlas Cloud'] img");
+
+ expect(logos).toHaveLength(2);
+ expect(logos[0]).toHaveAttribute("src", "/sponsors/atlas-cloud-logo-black.svg");
+ expect(logos[0]).toHaveClass("h-20", "pointer-events-none");
+ expect(logos[0]).toHaveAttribute("draggable", "false");
+ expect(logos[1]).toHaveAttribute("src", "/sponsors/atlas-cloud-logo-white.svg");
+ expect(link).toContainElement(logos[0] as HTMLElement);
+ expect(link).toContainElement(logos[1] as HTMLElement);
});
it("thanks sponsors and links sponsorship inquiries to email", () => {
diff --git a/apps/web/src/routes/_home/-sections/sponsors.tsx b/apps/web/src/routes/_home/-sections/sponsors.tsx
index d82801219..42da9f457 100644
--- a/apps/web/src/routes/_home/-sections/sponsors.tsx
+++ b/apps/web/src/routes/_home/-sections/sponsors.tsx
@@ -28,18 +28,23 @@ export const Sponsors = ({ show }: SponsorsProps) => {
target="_blank"
rel="noopener noreferrer"
aria-label="Atlas Cloud"
- className="mt-12 block"
+ className="mt-12 inline-block"
>
+ <span className="sr-only">Atlas Cloud</span>
<img
src="/sponsors/atlas-cloud-logo-black.svg"
- alt="Atlas Cloud"
- className="h-20 w-auto md:h-24 dark:hidden"
+ alt=""
+ aria-hidden="true"
+ draggable={false}
+ className="pointer-events-none h-20 w-auto md:h-24 dark:hidden"
loading="lazy"
/>
<img
src="/sponsors/atlas-cloud-logo-white.svg"
alt=""
- className="hidden h-20 w-auto md:h-24 dark:block"
+ aria-hidden="true"
+ draggable={false}
+ className="pointer-events-none hidden h-20 w-auto md:h-24 dark:block"
loading="lazy"
/>
</a>