From 98fbd7594f94caace0618821aede84b82bbc16b7 Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Sat, 13 Jun 2026 05:49:39 +0000 Subject: [PATCH 1/4] fix(accessibility): add aria-controls to collapsible table groups Linked the toggle button to the expanding/collapsing tbody region with an `id` and `aria-controls` for both UsecaseTable and ActorTable components. --- .jules/palette.md | 3 +++ apps/app/app/components/ActorTable.tsx | 4 +++- apps/app/app/components/UsecaseTable.tsx | 4 +++- 3 files changed, 9 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..374fb2ac --- /dev/null +++ b/.jules/palette.md @@ -0,0 +1,3 @@ +## 2024-05-24 - Accessibility for Collapsible Table Groupings +**Learning:** Collapsible table groupings (`tbody` rows expanding/collapsing on toggle) were missing `aria-controls` bindings to screen readers, preventing them from understanding the relationship between the toggle and the controlled content. +**Action:** When implementing expand/collapse functionalities, always add an `id` to the controlled region (like `tbody`) and link it back to the toggle button via `aria-controls`, in addition to `aria-expanded`. diff --git a/apps/app/app/components/ActorTable.tsx b/apps/app/app/components/ActorTable.tsx index 1cc5a5d0..3306fc40 100644 --- a/apps/app/app/components/ActorTable.tsx +++ b/apps/app/app/components/ActorTable.tsx @@ -148,14 +148,16 @@ export function ActorTable({ ) : ( groups.map(([type, items]) => { const isOpen = !collapsed.has(type); + const groupId = `actor-group-${type}`; return ( - +