make Claude sidebar sub-tabs keyboard-activatable

The Activity / Team / Config sub-tabs were built on a raw GestureDetector,
so Tab traversal skipped them and Enter/Space did nothing — a gap against
the repo's a11y contract. Switch to ClideTappable (focusable, Enter/Space
activates) wrapped in button + selected semantics, and add a test that
drives the switch via ActivateIntent rather than a pointer tap.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jeroen Schweitzer
2026-06-03 09:19:35 +02:00
co-authored by Claude Opus 4.8
parent 0f6c5af1d9
commit 6337bec152
3 changed files with 29 additions and 6 deletions
@@ -1229,11 +1229,15 @@ class _TabStrip extends StatelessWidget {
for (final t in SidebarTab.values)
Padding(
padding: const EdgeInsets.only(right: 16),
child: GestureDetector(
child: Semantics(
button: true,
selected: t == current,
label: _label(t),
excludeSemantics: true,
onTap: () => onPick(t),
child: MouseRegion(
cursor: SystemMouseCursors.click,
child: Container(
child: ClideTappable(
onTap: () => onPick(t),
builder: (ctx, hovered, _) => Container(
padding: const EdgeInsets.only(bottom: 3),
decoration: BoxDecoration(
border: Border(
@@ -1246,7 +1250,7 @@ class _TabStrip extends StatelessWidget {
child: ClideText(
_label(t),
fontSize: clideFontSmall,
color: t == current ? tokens.globalForeground : tokens.globalTextMuted,
color: t == current || hovered ? tokens.globalForeground : tokens.globalTextMuted,
),
),
),