fix(admin): explicit role-change button label

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) <noreply@anthropic.com>
This commit is contained in:
Marc-André BombeckandClaude Opus 4.7 committed 2026-05-10 13:41:52 +02:00
1 parent 1ae9b9dcad
commit 42b0f110ba
3 files changed
+9 -4

No files matched your search

+2 -2
View File
@@ -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",
+2 -2
View File
@@ -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",
@@ -182,6 +182,11 @@ export function UserManagementSection() {
? t("admin.demoteToUser")
: t("admin.promoteToAdmin")
}
aria-label={
u.role === "ADMIN"
? t("admin.demoteToUser")
: t("admin.promoteToAdmin")
}
>
<Shield className="mr-1 h-3 w-3" aria-hidden="true" />
{u.role === "ADMIN" ? t("admin.toUser") : t("admin.toAdmin")}