19 lines
661 B
TypeScript
19 lines
661 B
TypeScript
import { readFileSync } from "node:fs";
|
|
import path from "node:path";
|
|
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
describe("carousel accessibility copy", () => {
|
|
it("uses translation keys for ARIA role descriptions", () => {
|
|
const source = readFileSync(
|
|
path.resolve(process.cwd(), "apps/web/app/components/ui/carousel.tsx"),
|
|
"utf8",
|
|
);
|
|
|
|
expect(source).toContain('aria-roledescription={t("shared.carousel")}');
|
|
expect(source).toContain('aria-roledescription={t("shared.slide")}');
|
|
expect(source).not.toContain('aria-roledescription="carousel"');
|
|
expect(source).not.toContain('aria-roledescription="slide"');
|
|
});
|
|
});
|