diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 0000000..e34464b --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,3 @@ +## 2025-02-23 - Accessible Collapsible Sections and Screen Reader Noise Reduction +**Learning:** When creating collapsible UI sections (like "What do these numbers mean?"), it's crucial to semantically link the toggle button to the content container using `aria-controls="[id]"` and `aria-expanded={boolean}` so screen readers understand the relationship. Additionally, visual-only decorative elements and instructional text that is evident visually but redundant to the component's functionality (e.g. `— click to expand`) should be hidden from screen readers using `aria-hidden="true"` to reduce cognitive load and noise. +**Action:** Always verify that custom disclose/expand widgets have an explicit `id` on the target container, `aria-controls` on the button, and properly synced `aria-expanded`. Audit buttons with complex inner HTML and apply `aria-hidden="true"` to spans that are purely visual or decorative. diff --git a/packages/web/src/components/dashboard/overview-stats.tsx b/packages/web/src/components/dashboard/overview-stats.tsx index cce93b6..c6592a5 100644 --- a/packages/web/src/components/dashboard/overview-stats.tsx +++ b/packages/web/src/components/dashboard/overview-stats.tsx @@ -44,6 +44,8 @@ function StatTile({ label, value, valueTone = 'default', subtext }: StatTileProp ) } +import { useId } from 'react' + export function OverviewStats({ periodLabel, sessions, @@ -56,6 +58,7 @@ export function OverviewStats({ rangeSelector, }: OverviewStatsProps) { const [expanded, setExpanded] = useState(false) + const detailsId = useId() return (
@@ -85,15 +88,17 @@ export function OverviewStats({ {expanded && ( -
+

Sessions — 팀원들이 시작한 Claude Code 세션 수.