mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-04 11:01:16 +01:00
fix(auth): align alert live region semantics
This commit is contained in:
1 parent
6ab7fa8e0c
commit
3531d19002
4 files changed
+3
-4
No files matched your search
@@ -188,7 +188,7 @@ describe("AuthPage", () => {
|
||||
|
||||
const alert = container.querySelector('[role="alert"]') as HTMLElement;
|
||||
expect(alert).not.toBeNull();
|
||||
expect(alert.getAttribute("aria-live")).toBe("polite");
|
||||
expect(alert.hasAttribute("aria-live")).toBe(false);
|
||||
expect(alert.textContent).toContain("Invalid email or password");
|
||||
|
||||
const errorId = alert.id;
|
||||
|
||||
@@ -158,7 +158,7 @@ export function AuthPage() {
|
||||
/>
|
||||
</div>
|
||||
{error && (
|
||||
<p id={errorId} role="alert" aria-live="polite" className="text-xs text-destructive">
|
||||
<p id={errorId} role="alert" className="text-xs text-destructive">
|
||||
{error}
|
||||
</p>
|
||||
)}
|
||||
|
||||
@@ -320,7 +320,7 @@ describe("InviteLandingPage", () => {
|
||||
|
||||
const alert = container.querySelector('[role="alert"]') as HTMLElement;
|
||||
expect(alert).not.toBeNull();
|
||||
expect(alert.getAttribute("aria-live")).toBe("polite");
|
||||
expect(alert.hasAttribute("aria-live")).toBe(false);
|
||||
|
||||
const errorId = alert.id;
|
||||
expect(errorId.length).toBeGreaterThan(0);
|
||||
|
||||
@@ -770,7 +770,6 @@ export function InviteLandingPage() {
|
||||
<p
|
||||
id={authErrorId}
|
||||
role="alert"
|
||||
aria-live="polite"
|
||||
className={`text-xs ${
|
||||
authFeedback.tone === "info" ? "text-amber-300" : "text-red-400"
|
||||
}`}
|
||||
|
||||
Reference in new issue
Block a user