mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 13:52:20 +00:00
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:
1 parent
1ae9b9dcad
commit
42b0f110ba
3 files changed
+9
-4
No files matched your search
+2
-2
@@ -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
@@ -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")}
|
||||
|
||||
Reference in new issue
Block a user