From 10730705c4da819a312b08a69f0ffa523b75d005 Mon Sep 17 00:00:00 2001 From: Per Classon Date: Thu, 28 Nov 2019 18:09:12 +0100 Subject: [PATCH] Improve the screen reader order on Overview (#396) --- gallery/lib/studies/rally/tabs/overview.dart | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gallery/lib/studies/rally/tabs/overview.dart b/gallery/lib/studies/rally/tabs/overview.dart index a66c6110..6321a81c 100644 --- a/gallery/lib/studies/rally/tabs/overview.dart +++ b/gallery/lib/studies/rally/tabs/overview.dart @@ -29,6 +29,7 @@ class _OverviewViewState extends State { final alerts = DummyDataService.getAlerts(context); if (isDisplayDesktop(context)) { + const sortKeyName = 'Overview'; return SingleChildScrollView( child: Padding( padding: const EdgeInsets.symmetric(vertical: 24), @@ -37,14 +38,20 @@ class _OverviewViewState extends State { children: [ Flexible( flex: 7, - child: _OverviewGrid(spacing: 24), + child: Semantics( + sortKey: const OrdinalSortKey(1, name: sortKeyName), + child: _OverviewGrid(spacing: 24), + ), ), SizedBox(width: 24), Flexible( flex: 3, child: Container( width: 400, - child: _AlertsView(alerts: alerts), + child: Semantics( + sortKey: const OrdinalSortKey(2, name: sortKeyName), + child: _AlertsView(alerts: alerts), + ), ), ), ],