From 42b0f110ba65c9afc0f3a70f951390ada4d35764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 10 May 2026 13:41:52 +0200 Subject: [PATCH] fix(admin): explicit role-change button label MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The user-management role-change button rendered a bare arrow followed by "User" / "Admin" — direction was ambiguous ("does the arrow mean 'now they are User' or 'send them down to User'?") and the label carried no aria-label. Replaced the arrow text with explicit "Make user" / "Make admin" ("Zum Benutzer" / "Zum Admin"), and added the same string as aria-label so screen readers announce the action verb instead of the visible-only arrow glyph. Co-Authored-By: Claude Opus 4.7 (1M context) --- messages/de.json | 4 ++-- messages/en.json | 4 ++-- src/components/admin/user-management-section.tsx | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/messages/de.json b/messages/de.json index 8ac21f040..a76627089 100644 --- a/messages/de.json +++ b/messages/de.json @@ -1682,8 +1682,8 @@ "editUserTitle": "Benutzer bearbeiten: {name}", "demoteToUser": "Zu User degradieren", "promoteToAdmin": "Zum Admin befördern", - "toUser": "→ User", - "toAdmin": "→ Admin", + "toUser": "Zum Benutzer", + "toAdmin": "Zum Admin", "ownRoleUnchangeable": "Eigene Rolle nicht änderbar", "lastAdminError": "Der letzte Admin kann nicht degradiert werden", "resetPassword": "Passwort zurücksetzen", diff --git a/messages/en.json b/messages/en.json index 1b48d368c..4facece9f 100644 --- a/messages/en.json +++ b/messages/en.json @@ -1682,8 +1682,8 @@ "editUserTitle": "Edit user: {name}", "demoteToUser": "Demote to user", "promoteToAdmin": "Promote to admin", - "toUser": "→ User", - "toAdmin": "→ Admin", + "toUser": "Make user", + "toAdmin": "Make admin", "ownRoleUnchangeable": "Cannot change own role", "lastAdminError": "Cannot demote the last admin", "resetPassword": "Reset password", diff --git a/src/components/admin/user-management-section.tsx b/src/components/admin/user-management-section.tsx index f60bdda09..d2903ec08 100644 --- a/src/components/admin/user-management-section.tsx +++ b/src/components/admin/user-management-section.tsx @@ -182,6 +182,11 @@ export function UserManagementSection() { ? t("admin.demoteToUser") : t("admin.promoteToAdmin") } + aria-label={ + u.role === "ADMIN" + ? t("admin.demoteToUser") + : t("admin.promoteToAdmin") + } >