Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Announce login + change-password errors to screen readers

rcourtmandf56a1f14f5a
diff --git a/frontend-modern/src/components/Login.tsx b/frontend-modern/src/components/Login.tsx
index 3a6faa850c..7ab9f832e6 100644
--- a/frontend-modern/src/components/Login.tsx
+++ b/frontend-modern/src/components/Login.tsx
@@ -529,6 +529,8 @@ const LoginForm: Component<{
<Show when={error()}>
<div
+ role="alert"
+ aria-live="assertive"
class={`rounded-md p-4 ${
error().includes('locked')
? 'bg-orange-50 dark:bg-orange-900'
diff --git a/frontend-modern/src/components/Settings/ChangePasswordModal.tsx b/frontend-modern/src/components/Settings/ChangePasswordModal.tsx
index ce635935b5..5aead9777d 100644
--- a/frontend-modern/src/components/Settings/ChangePasswordModal.tsx
+++ b/frontend-modern/src/components/Settings/ChangePasswordModal.tsx
@@ -174,7 +174,11 @@ export const ChangePasswordModal: Component<ChangePasswordModalProps> = (props)
</div>
<Show when={error()}>
- <div class="p-3 bg-red-50 dark:bg-red-900 border border-red-200 dark:border-red-800 rounded-md">
+ <div
+ role="alert"
+ aria-live="assertive"
+ class="p-3 bg-red-50 dark:bg-red-900 border border-red-200 dark:border-red-800 rounded-md"
+ >
<p class="text-sm text-red-600 dark:text-red-400">{error()}</p>
</div>
</Show>