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
+3 -1
View File
@@ -16,15 +16,17 @@ abstract final class A11yLabels {
static const draft = 'Entwurf';
static const yourReaction = 'deine Reaktion';
// Bilder
// Bilder / Kontakte
static const profilePicture = 'Profilbild';
static const groupPicture = 'Gruppenbild';
static const group = 'Gruppe';
static const roomPlan = 'Raumplan der Schule als Grafik';
// Stundenplan
static const cancelled = 'Ausfall';
static const breakTime = 'Pause';
static const allDay = 'Ganztägig';
static const today = 'heute';
/// Beschreibt eine Stundenplan-Kachel für den Screenreader, z.B.
/// „Mathe, Raum 101, 08:0008:45, Ausfall". Zeilenumbrüche in [location]
+12 -7
View File
@@ -22,13 +22,18 @@ Future<void> showDetailsBottomSheet(
padding: EdgeInsets.only(
bottom: 16 + MediaQuery.viewInsetsOf(sheetContext).bottom,
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
if (header != null) ...[header, const Divider(height: 1)],
...children(sheetContext),
],
// Ohne dieses innere Material malt ListTile-Ink aufs Sheet-Material
// außerhalb des Scrollbereichs und stretcht beim Overscroll nicht mit.
child: Material(
type: MaterialType.transparency,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
if (header != null) ...[header, const Divider(height: 1)],
...children(sheetContext),
],
),
),
),
),
+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,
),
],
),
),
),
),
),
+5 -2
View File
@@ -186,6 +186,7 @@ class _FileViewerState extends State<FileViewer> {
...actions,
if (showActionsMenu)
PopupMenuButton<FileViewingActions>(
tooltip: 'Dateiaktionen',
onSelected: _handleAction,
itemBuilder: (context) => _availableActions()
.map(
@@ -282,8 +283,10 @@ class _FileViewerState extends State<FileViewer> {
),
);
Widget _buildPdfView() =>
Scaffold(appBar: _appbar(), body: DeferredPdfViewer(path: widget.path));
Widget _buildPdfView() => Scaffold(
appBar: _appbar(),
body: DeferredPdfViewer(path: widget.path),
);
Widget _buildVideoView() => Scaffold(
appBar: _appbar(),