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.

frontend: expose accordion expand state to screen readers

rcourtman9619d39747ee
diff --git a/frontend-modern/src/components/Settings/AIProviderConfigurationSection.tsx b/frontend-modern/src/components/Settings/AIProviderConfigurationSection.tsx
index 2205d9c172..42749f3b15 100644
--- a/frontend-modern/src/components/Settings/AIProviderConfigurationSection.tsx
+++ b/frontend-modern/src/components/Settings/AIProviderConfigurationSection.tsx
@@ -135,6 +135,8 @@ export const AIProviderConfigurationSection: Component<AIProviderConfigurationSe
type="button"
class="w-full min-h-10 sm:min-h-9 px-3 py-2.5 flex items-center justify-between bg-surface hover:bg-surface-hover transition-colors"
onClick={() => toggleProvider(config.provider)}
+ aria-expanded={expanded()}
+ aria-controls={`${config.provider}-provider-panel`}
>
<div class="flex items-center gap-2">
<span class="font-medium text-sm">{config.title}</span>
@@ -166,7 +168,10 @@ export const AIProviderConfigurationSection: Component<AIProviderConfigurationSe
</svg>
</button>
<Show when={expanded()}>
- <div class="px-3 py-3 bg-surface-alt border-t border-border space-y-2">
+ <div
+ id={`${config.provider}-provider-panel`}
+ class="px-3 py-3 bg-surface-alt border-t border-border space-y-2"
+ >
<Show when={config.provider === 'ollama'}>
<label class="text-xs text-muted inline-flex items-center gap-1">
Server URL
diff --git a/frontend-modern/src/components/Settings/AIRuntimeControlsSection.tsx b/frontend-modern/src/components/Settings/AIRuntimeControlsSection.tsx
index 4ad945d582..2ce994b3de 100644
--- a/frontend-modern/src/components/Settings/AIRuntimeControlsSection.tsx
+++ b/frontend-modern/src/components/Settings/AIRuntimeControlsSection.tsx
@@ -44,6 +44,8 @@ export const AIDiscoveryControlsSection: Component<AIRuntimeControlsSectionProps
type="button"
class="w-full min-h-10 sm:min-h-9 px-3 py-2.5 flex items-center justify-between bg-blue-50 dark:bg-blue-900 hover:bg-blue-100 dark:hover:bg-blue-900 transition-colors text-left"
onClick={() => state.setShowDiscoverySettings(!state.showDiscoverySettings())}
+ aria-expanded={state.showDiscoverySettings()}
+ aria-controls="ai-discovery-controls-panel"
>
<div class="flex items-center gap-2">
<svg
@@ -88,7 +90,10 @@ export const AIDiscoveryControlsSection: Component<AIRuntimeControlsSectionProps
</svg>
</button>
<Show when={state.showDiscoverySettings()}>
- <div class="px-3 py-3 bg-surface border-t border-border space-y-3">
+ <div
+ id="ai-discovery-controls-panel"
+ class="px-3 py-3 bg-surface border-t border-border space-y-3"
+ >
<div class="flex items-center justify-between gap-2">
<label class="text-xs font-medium text-muted flex items-center gap-1.5">
Enable service context scans