From 1e3ba46e953f57b6948c3d57ba884011f4b20d26 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 18:10:28 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Improve=20accessibili?= =?UTF-8?q?ty=20of=20collapsible=20UI=20components?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💡 What: - Added `aria-expanded` and `aria-controls` to the toggle button in the `CollapsibleSection` component (used heavily in the JS8Call ListeningPost). - Used React's `useId()` hook to dynamically generate a unique ID for the content block to properly associate with `aria-controls`. - Added missing keyboard focus states (`focus-visible:ring-1 focus-visible:ring-cyan-500 outline-none`) to the toggle button. - Added `aria-hidden="true"` to purely decorative SVG icons within the button. - Applied identical accessibility improvements to the "Manual Entry" toggle block in `KiwiNodeBrowser.tsx` (hardcoded ID since it is a single instance). 🎯 Why: Screen reader users navigating custom accordion or collapsible blocks were previously unaware of the section's expanded/collapsed state or which content it controlled because the buttons lacked the semantic ARIA hooks (`aria-expanded` and `aria-controls`). Additionally, keyboard-only users lacked a clear visual indicator of which section was currently focused. ♿ Accessibility: - Explicitly binds the toggle button to its content container via `aria-controls`. - Exposes state via `aria-expanded`. - Restores keyboard focus visibility. - Hides decorative Chevrons from screen readers to reduce noise. Co-authored-by: d3mocide <136547209+d3mocide@users.noreply.github.com> --- .jules/palette.md | 4 ++++ .../src/components/js8call/KiwiNodeBrowser.tsx | 10 ++++++---- frontend/src/components/js8call/ListeningPost.tsx | 15 +++++++++------ 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.jules/palette.md b/.jules/palette.md index 3dce5527..5093a1c1 100644 --- a/.jules/palette.md +++ b/.jules/palette.md @@ -105,3 +105,7 @@ ## 2025-04-24 - Interactive Element Keyboard Accessibility **Learning:** Found multiple interactive ` {showManual && ( -
+