import "@testing-library/jest-dom";
import * as React from "react";
import { describe, it } from "vitest";
import { Button } from "./button";
import BackButtonWithTitle from "./buttons/BackButtonWithTitle";
import { expectNoAxeViolations } from "@toolctrl/ui-app/test-setup/axe";
/**
* Complementary to button.a11y.test.tsx (which uses the static helper at
* apps/web/app/utils/test/a11y.tsx). This file runs the full axe-core engine
* via @toolctrl/ui-app/test-setup/axe to catch issues the static heuristic
* can't (e.g. aria-disabled vs disabled, redundant roles).
*/
describe("Button axe-core a11y", () => {
it("text button has no axe violations", async () => {
await expectNoAxeViolations();
});
it("icon-only button with aria-label has no axe violations", async () => {
await expectNoAxeViolations(
,
);
});
it("arrow-only back button has a translated accessible name", async () => {
await expectNoAxeViolations(Settings);
});
});