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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user