fix: react-doctor modal/dialog/dropzone a11y — 18 files to role+tabIndex+onKeyDown or dialog

This commit is contained in:
Nora
2026-06-26 03:20:10 -06:00
parent e3c1295e62
commit d0bfec9d36
90 changed files with 747 additions and 408 deletions
+8 -4
View File
@@ -256,10 +256,14 @@ export function CartProvider({ children }: { children: ReactNode }) {
}, []);
const decreaseQuantity = useCallback((id: string) => {
setCart((prev) =>
prev.map((item) => (item.id === id ? { ...item, quantity: item.quantity - 1 } : item))
.filter((item) => item.quantity > 0)
);
setCart((prev) => {
const next = [];
for (const item of prev) {
const updated = item.id === id ? { ...item, quantity: item.quantity - 1 } : item;
if (updated.quantity > 0) next.push(updated);
}
return next;
});
}, []);
const removeFromCart = useCallback((id: string) => {