mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-09-30 06:53:12 +00:00
fix(work-orders): expose disabled flag name via img role
This commit is contained in:
parent
bae6d15043
commit
8d44b1868c
2 changed files with 2 additions and 1 deletions
|
|
@ -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}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue