From 0e657a5c3eca9cf4741fb10936253ff8d87e4862 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 17 Jul 2026 08:18:35 +0000 Subject: [PATCH 1/2] Fix frontend a11y/layout audit findings: toggle-group + duplicate padding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two P2 findings from the repo audit (self-contained frontend): - differentials-home: the result-type filters used role="tab"/role="tablist" + aria-selected but had no tabpanel, aria-controls, or roving tabindex — an incomplete/mismatched ARIA-tabs pattern. They filter a single results list (they don't switch between panels), so convert them to a single-select toggle group (role="group" + aria-pressed), matching the repo's existing toggle-group convention. No test asserted the old roles. - global-search-shell: the reserves-floating-composer (non-answer, non-compact) branch set both sm:pb-[calc(9rem+safe-area)] AND sm:pb-8 in one className, so the effective bottom padding depended on Tailwind class ordering. That branch reserves space for the full floating composer, so keep the calc reserve (matching the answer branch) and drop the erroneous sm:pb-8. Verified offline: prettier + lint clean, typecheck clean on both files, 53 differentials unit tests pass. Browser a11y/layout is exercised by the CI ui-accessibility / ui-critical / ui-regression gates (ui_changed). Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_019UQUcNriJUVSGRhWz794RQ --- src/components/clinical-dashboard/differentials-home.tsx | 8 +++++--- src/components/clinical-dashboard/global-search-shell.tsx | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/clinical-dashboard/differentials-home.tsx b/src/components/clinical-dashboard/differentials-home.tsx index 3b888af2a..8c1a6e43d 100644 --- a/src/components/clinical-dashboard/differentials-home.tsx +++ b/src/components/clinical-dashboard/differentials-home.tsx @@ -276,10 +276,13 @@ function ResultTypeTabs({ { id: "diagnosis" as const, label: "Diagnoses", count: diagnosisCount }, ]; + // Single-select filters over one results list — modeled as a toggle group + // (role="group" + aria-pressed), not ARIA tabs (which would need tabpanels, + // aria-controls, and roving tabindex for content that does not exist here). return (
@@ -289,8 +292,7 @@ function ResultTypeTabs({