diff --git a/apps/web/src/app/accounts/[id]/page.tsx b/apps/web/src/app/accounts/[id]/page.tsx index 963b293..7f211ef 100644 --- a/apps/web/src/app/accounts/[id]/page.tsx +++ b/apps/web/src/app/accounts/[id]/page.tsx @@ -74,33 +74,37 @@ export default async function AccountDetailPage({ params }: AccountDetailPagePro
- {/* Pair / Re-pair — entire card is the submit button */} + {/* Pair / Re-pair — keep the form-submit semantics. The whole + card surface is still the click target via a transparent + overlay submit button positioned over the card; the visible + Card stays a
, so we never nest a
inside a + + aria-label={account.status === "unpaired" ? "Pair WhatsApp" : "Re-pair WhatsApp"} + className="absolute inset-0 w-full rounded-xl bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" + /> )} @@ -130,27 +134,27 @@ export default async function AccountDetailPage({ params }: AccountDetailPagePro {/* Unpair — entire card opens the confirm dialog */} - +
+

Unpair

+

+ Disconnect from WhatsApp; keep the account so you can re-pair later +

+
+
+ + + @@ -178,27 +182,27 @@ export default async function AccountDetailPage({ params }: AccountDetailPagePro {/* Delete — entire card opens the confirm dialog */} - +
+

Delete Account

+

+ Remove the account and all its reminders, groups, and history +

+
+
+ + + diff --git a/apps/web/src/components/accounts-list-view.test.tsx b/apps/web/src/components/accounts-list-view.test.tsx index c1aac06..a3174f4 100644 --- a/apps/web/src/components/accounts-list-view.test.tsx +++ b/apps/web/src/components/accounts-list-view.test.tsx @@ -109,17 +109,20 @@ describe("AccountsListView", () => { expect(html).toMatch(/MyBiz<\/strong>/); }); - it("delete card is a button with the destructive aria-label", () => { + it("delete card is a focusable trigger element with the destructive aria-label", () => { const html = renderToStaticMarkup( , ); - // Order of attributes in the rendered + +
+ +
+
+

Delete account

+

+ Remove {account.label} and its reminders & groups +

+
+
+