further improved accessibility across the application and add tooltips to action buttons

This commit is contained in:
2026-07-15 19:29:40 +02:00
parent 478f0ff20b
commit e8c6ac1c65
13 changed files with 366 additions and 268 deletions
+49 -34
View File
@@ -154,13 +154,14 @@ class _DownloadTrayHostState extends State<DownloadTrayHost>
/// The chip only shows when there's something the inline UI can't already
/// convey: multiple downloads, a finished/failed one (no inline progress
/// left), or a lone download whose originating screen the user has left.
bool _shouldShowChip(List<DownloadJob> jobs, int epoch) => shouldShowDownloadChip(
sheetOpen: _sheetOpen,
jobCount: jobs.length,
anySurfaced: jobs.any(
(j) => j.isDone || j.isFailed || (_originEpoch[j] ?? epoch) != epoch,
),
);
bool _shouldShowChip(List<DownloadJob> jobs, int epoch) =>
shouldShowDownloadChip(
sheetOpen: _sheetOpen,
jobCount: jobs.length,
anySurfaced: jobs.any(
(j) => j.isDone || j.isFailed || (_originEpoch[j] ?? epoch) != epoch,
),
);
Future<void> _openSheet() async {
if (_sheetOpen) return;
@@ -311,34 +312,48 @@ class _TrayChip extends StatelessWidget {
label = doneCount == 1 ? 'Download fertig' : '$doneCount fertig';
}
return Material(
color: colors.surfaceContainerHigh,
elevation: 4,
borderRadius: BorderRadius.circular(24),
shadowColor: Colors.black45,
child: InkWell(
borderRadius: BorderRadius.circular(24),
onTap: onTap,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
leading,
const SizedBox(width: 12),
Flexible(
child: Text(
label,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.bodyMedium?.copyWith(
fontWeight: FontWeight.w600,
),
),
return Semantics(
button: true,
label: '$label, Downloads anzeigen',
onTap: onTap,
child: ExcludeSemantics(
child: Material(
color: colors.surfaceContainerHigh,
elevation: 4,
borderRadius: BorderRadius.circular(24),
shadowColor: Colors.black45,
child: InkWell(
borderRadius: BorderRadius.circular(24),
onTap: onTap,
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 10,
),
const SizedBox(width: 8),
Icon(Icons.expand_less, size: 20, color: colors.onSurfaceVariant),
],
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
leading,
const SizedBox(width: 12),
Flexible(
child: Text(
label,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.bodyMedium?.copyWith(
fontWeight: FontWeight.w600,
),
),
),
const SizedBox(width: 8),
Icon(
Icons.expand_less,
size: 20,
color: colors.onSurfaceVariant,
),
],
),
),
),
),
),