fix(design): a toggle is pressed, never a bare aria-pressed; static labels are flat Badges with a tone, edged label spans lint-refused (E28)

This commit is contained in:
2026-09-25 17:04:08 +02:00
parent b9850b1710
commit e13d93a3ed
18 changed files with 113 additions and 44 deletions
@@ -261,6 +261,9 @@ describe("Button accessible-name contract (type level)", () => {
<Button icon={<span />} aria-label="by aria-label" />
<Button icon={<span />} title="by title" />
<Button>plain text needs none</Button>
{/* @ts-expect-error a toggle states itself through `pressed`, which also paints it (B3) */}
<Button aria-pressed>raw toggle</Button>
<Button pressed>toggle</Button>
</>,
);
expect(screen.getByRole("button", { name: "by label" })).toBeTruthy();