mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-10 21:26:08 -05:00
Fix Toast aria role
This commit is contained in:
@@ -33,7 +33,7 @@ describe("Toast", () => {
|
||||
|
||||
toastQueue.add({ message: "Dismiss me", variant: "info" }, { timeout: 0 });
|
||||
|
||||
const toast = screen.getByRole("alert").filter({ hasText: "Dismiss me" });
|
||||
const toast = screen.getByRole("status").filter({ hasText: "Dismiss me" });
|
||||
await expect.element(toast).toBeVisible();
|
||||
|
||||
await screen.getByLabelText("Close").first().click();
|
||||
|
||||
@@ -99,7 +99,7 @@ export function SendouToastRegion() {
|
||||
{toasts.map((toast) => (
|
||||
<div
|
||||
key={toast.key}
|
||||
role="alert"
|
||||
role={toast.content.variant === "error" ? "alert" : "status"}
|
||||
style={{ viewTransitionName: toast.key }}
|
||||
className={clsx(styles.toast, {
|
||||
[styles.errorToast]: toast.content.variant === "error",
|
||||
|
||||
Reference in New Issue
Block a user