fix(work-orders): expose disabled flag name via img role

This commit is contained in:
Arthur Bassi 2026-08-31 09:49:09 -03:00
parent bae6d15043
commit 8d44b1868c
2 changed files with 2 additions and 1 deletions

View file

@ -17,6 +17,7 @@ export function FlagCell({ color, disabled, onChange }: FlagCellProps) {
if (disabled) {
return (
<span
role="img"
className="flex h-[22px] w-[22px] items-center justify-center opacity-30"
aria-label={triggerName}
>

View file

@ -34,7 +34,7 @@ describe("FlagCell", () => {
const onChange = vi.fn();
render(<FlagCell color="#EF4444" disabled onChange={onChange} />);
expect(screen.getByLabelText("Red flag")).toBeInTheDocument();
expect(screen.getByRole("img", { name: "Red flag" })).toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Red flag" })).toBeNull();
expect(onChange).not.toHaveBeenCalled();
});