From ab98c4a8c036304dbf06c826393a4c3da4ecc326 Mon Sep 17 00:00:00 2001 From: Kirk Swenson Date: Tue, 24 Feb 2026 16:09:46 -0800 Subject: [PATCH 1/3] CODAP-575: add aria-label to tool shelf and inspector panel buttons Add aria-label attributes to all toolbar buttons (Tables, Graph, Map, Slider, Calc, Text, Plugins, Undo, Redo, Tiles, Guide) and all inspector panel buttons (InspectorButton and InspectorMenu) across all tile types. For icon-only buttons (e.g. text inspector), the tooltip is used as the aria-label with parenthetical keyboard shortcuts stripped to keep screen reader announcements clean. Co-Authored-By: Claude Opus 4.6 --- .../components/case-table/case-table-tool-shelf-button.tsx | 1 + v3/src/components/inspector-panel.tsx | 7 ++++++- v3/src/components/tool-shelf/guide-button.tsx | 1 + v3/src/components/tool-shelf/plugins-button.tsx | 1 + v3/src/components/tool-shelf/tiles-list-button.tsx | 1 + v3/src/components/tool-shelf/tool-shelf-button.tsx | 1 + 6 files changed, 11 insertions(+), 1 deletion(-) diff --git a/v3/src/components/case-table/case-table-tool-shelf-button.tsx b/v3/src/components/case-table/case-table-tool-shelf-button.tsx index 90f46c75f9..ea06b80e7d 100644 --- a/v3/src/components/case-table/case-table-tool-shelf-button.tsx +++ b/v3/src/components/case-table/case-table-tool-shelf-button.tsx @@ -132,6 +132,7 @@ export const CaseTableToolShelfButton = observer(function CaseTableToolShelfButt return ( diff --git a/v3/src/components/inspector-panel.tsx b/v3/src/components/inspector-panel.tsx index c2fc920ef4..0c25ec4ba6 100644 --- a/v3/src/components/inspector-panel.tsx +++ b/v3/src/components/inspector-panel.tsx @@ -47,8 +47,12 @@ export const InspectorButton = forwardRef(function InspectorButton({ bottom, children, isActive, isDisabled, label, onButtonClick, onPointerDown, testId, tooltip, top }: IInspectorButtonProps, ref) { const className = clsx("inspector-tool-button", { active: isActive, bottom, top }) + // Strip parenthetical keyboard shortcuts from tooltips (e.g. "bold (⌘-b)" → "bold") + // so screen readers announce a clean name rather than reading out the shortcut syntax. + const ariaLabel = label || tooltip.replace(/\s*\(.*\)$/, "") return (