From 2289ca3e11ea86db8747bd44c7ad994ca267543b Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 23:46:33 +0000 Subject: [PATCH 1/2] feat: add a11y attributes to DashboardFilters and refresh button * Add `aria-expanded` and `aria-controls` to the toggle button in `DashboardFilters` * Add `id` to the filter content container in `DashboardFilters` * Add `aria-label` to the refresh icon-only button in `insights/page.tsx` * Create UX journal entry in `.Jules/palette.md` Co-authored-by: aarjava <218419324+aarjava@users.noreply.github.com> --- .Jules/palette.md | 4 ++++ src/app/(app)/insights/page.tsx | 7 ++++++- src/components/DashboardFilters.tsx | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .Jules/palette.md diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 00000000..51244ecc --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,4 @@ +## 2024-05-17 - DashboardFilters Toggle Accessibility + +**Learning:** The toggle button in the `DashboardFilters` component rendered with the text 'Expand' (collapsed) or 'Collapse' (expanded), but lacked `aria-expanded` and `aria-controls` attributes, making its state and relationship to the filter content unclear to screen readers. +**Action:** Always add `aria-expanded` reflecting the state and `aria-controls` linking to the ID of the controlled content container for expand/collapse toggles. diff --git a/src/app/(app)/insights/page.tsx b/src/app/(app)/insights/page.tsx index 5032062b..3c824ca6 100644 --- a/src/app/(app)/insights/page.tsx +++ b/src/app/(app)/insights/page.tsx @@ -160,7 +160,12 @@ export default function InsightsPage() { ))} - diff --git a/src/components/DashboardFilters.tsx b/src/components/DashboardFilters.tsx index bb773023..65f69331 100644 --- a/src/components/DashboardFilters.tsx +++ b/src/components/DashboardFilters.tsx @@ -61,6 +61,8 @@ export function DashboardFilters({ @@ -134,18 +135,19 @@ export default function FilterPanel() { @@ -182,12 +185,14 @@ export default function FilterPanel() { Show only unresolved diff --git a/src/components/FluxLensLogo.tsx b/src/components/FluxLensLogo.tsx index a2ff4a28..be665f33 100644 --- a/src/components/FluxLensLogo.tsx +++ b/src/components/FluxLensLogo.tsx @@ -63,10 +63,7 @@ export function FluxLensLogo({ alt="FluxLens" fill sizes={`${iconPixelSize}px`} - className={cn( - 'object-contain opacity-95', - theme === 'light' && 'brightness-0' - )} + className={cn('object-contain opacity-95', theme === 'light' && 'brightness-0')} /> diff --git a/src/components/analytics/RiskWeightedTimeline.tsx b/src/components/analytics/RiskWeightedTimeline.tsx index 83750438..b8985226 100644 --- a/src/components/analytics/RiskWeightedTimeline.tsx +++ b/src/components/analytics/RiskWeightedTimeline.tsx @@ -116,8 +116,8 @@ export function RiskWeightedTimeline({ const avgConfidence = filteredEvents.length > 0 ? Math.round( - (filteredEvents.reduce((acc, e) => acc + e.confidence, 0) / filteredEvents.length) * 100 - ) + (filteredEvents.reduce((acc, e) => acc + e.confidence, 0) / filteredEvents.length) * 100 + ) : 0 return { critical, high, avgConfidence, total: filteredEvents.length } }, [filteredEvents]) @@ -214,7 +214,10 @@ export function RiskWeightedTimeline({ aria-pressed={isEnabled} aria-label={`Filter ${config.label} events`} > - + {config.label} {events.filter((e) => e.lane === lane).length} @@ -241,7 +244,9 @@ export function RiskWeightedTimeline({

No events match the current filters

+ + )} + +
+
+ {currentUserName.charAt(0).toUpperCase()} +
+ +
+