diff --git a/apps/www/src/components/marketing/footer-status-badge.test.tsx b/apps/www/src/components/marketing/footer-status-badge.test.tsx new file mode 100644 index 00000000..d6cecb38 --- /dev/null +++ b/apps/www/src/components/marketing/footer-status-badge.test.tsx @@ -0,0 +1,42 @@ +import { render } from "@testing-library/react"; +import { describe, expect, it } from "vitest"; + +import { THIRD_PARTY_STATUS_BADGE } from "../../../playwright/axe-scope"; + +import { Footer } from "./footer"; + +// The hole the axe exclusion opened, closed. +// +// `apps/www/playwright/axe-scope.ts` excludes the Phare status-badge iframes from the accessibility +// audit, because axe walks INTO frames and a violation inside a vendor's cross-origin document is not +// something we can fix — it just reds the whole suite, ~55 tests at once, three times in two days. +// +// That exclusion is right, but `.exclude()` drops the element AND its subtree, so axe no longer checks +// the one thing about those iframes that IS ours: the `title` on the element itself. Delete the title +// tomorrow and the suite stays green, having been told not to look. An exemption is only as safe as +// whatever replaces what it gave up — this is that replacement. +describe("footer status badge", () => { + it("gives every status-badge iframe a title, which axe no longer checks for us", () => { + const { container } = render(