From 68ff3a45ef8c74f21f6628295bcd30fd8ef5d38a Mon Sep 17 00:00:00 2001 From: Bretton <36870434+BrettM86@users.noreply.github.com> Date: Thu, 16 Jul 2026 04:02:16 -0700 Subject: [PATCH] fix(a11y): expose See-all buttons and admin back arrow to assistive tech - Discovery section headers merged the "See all
" button into the title row's semantics node, so screen readers and UI tests could not target the button (taps resolved to the row's dead center). Give the button its own semantics boundary (container: true). - The admin panel's back arrow IconButton had no label; add tooltip 'Back'. Also document why the panel cannot intercept system back (CreatePostScreen keeps an always-alive PopScope in the shell's IndexedStack that turns every system back press into a switch to the Home tab). Co-Authored-By: Claude Fable 5 --- lib/screens/home/communities_admin_panel.dart | 5 +++++ lib/screens/home/communities_discovery_screen.dart | 3 +++ 2 files changed, 8 insertions(+) diff --git a/lib/screens/home/communities_admin_panel.dart b/lib/screens/home/communities_admin_panel.dart index 0bda94e..c7d3626 100644 --- a/lib/screens/home/communities_admin_panel.dart +++ b/lib/screens/home/communities_admin_panel.dart @@ -262,6 +262,10 @@ class _CommunitiesAdminPanelState extends State { @override Widget build(BuildContext context) { + // NOTE: system back is intercepted shell-wide by CreatePostScreen's + // PopScope (alive in MainShellScreen's IndexedStack), which switches to + // the Home tab on every back press. Adding a PopScope here cannot + // override that — use the in-app Back arrow to return to the menu. return Scaffold( backgroundColor: AppColors.background, appBar: AppBar( @@ -272,6 +276,7 @@ class _CommunitiesAdminPanelState extends State { leading: _currentPage != AdminPage.menu ? IconButton( icon: const Icon(Icons.arrow_back), + tooltip: 'Back', onPressed: _navigateBack, ) : null, diff --git a/lib/screens/home/communities_discovery_screen.dart b/lib/screens/home/communities_discovery_screen.dart index 3ccc0bc..48155ef 100644 --- a/lib/screens/home/communities_discovery_screen.dart +++ b/lib/screens/home/communities_discovery_screen.dart @@ -930,6 +930,9 @@ class _CommunitiesDiscoveryScreenState Semantics( label: 'See all $title', button: true, + // Own semantics boundary so screen readers and UI tests see the + // button separately from the section title row. + container: true, child: Material( color: AppColors.teal.withValues(alpha: 0.1), borderRadius: BorderRadius.circular(100), -- 2.51.2