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
+53 -41
View File
@@ -18,6 +18,14 @@ class LoginErrorBanner extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final showDetails = details != null
? () => InfoDialog.show(
context,
details!,
copyable: true,
title: 'Fehlerdetails',
)
: null;
return AnimatedSize(
duration: const Duration(milliseconds: 180),
curve: Curves.easeOut,
@@ -25,52 +33,56 @@ class LoginErrorBanner extends StatelessWidget {
? const SizedBox(height: 0, width: double.infinity)
: Padding(
padding: const EdgeInsets.only(top: 14),
child: Material(
color: theme.colorScheme.errorContainer.withValues(alpha: 0.6),
borderRadius: BorderRadius.circular(12),
child: InkWell(
onTap: details != null
? () => InfoDialog.show(
context,
details!,
copyable: true,
title: 'Fehlerdetails',
)
: null,
borderRadius: BorderRadius.circular(12),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 10,
child: Semantics(
button: showDetails != null,
label: showDetails != null
? '${message!}, Fehlerdetails anzeigen'
: message,
onTap: showDetails,
child: ExcludeSemantics(
child: Material(
color: theme.colorScheme.errorContainer.withValues(
alpha: 0.6,
),
child: Row(
children: [
Icon(
Icons.error_outline,
size: 20,
color: theme.colorScheme.onErrorContainer,
borderRadius: BorderRadius.circular(12),
child: InkWell(
onTap: showDetails,
borderRadius: BorderRadius.circular(12),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 10,
),
const SizedBox(width: 10),
Expanded(
child: Text(
message!,
style: TextStyle(
child: Row(
children: [
Icon(
Icons.error_outline,
size: 20,
color: theme.colorScheme.onErrorContainer,
fontSize: 13,
height: 1.3,
),
),
const SizedBox(width: 10),
Expanded(
child: Text(
message!,
style: TextStyle(
color: theme.colorScheme.onErrorContainer,
fontSize: 13,
height: 1.3,
),
),
),
if (details != null) ...[
const SizedBox(width: 8),
Icon(
Icons.chevron_right,
size: 20,
color: theme.colorScheme.onErrorContainer
.withValues(alpha: 0.7),
),
],
],
),
if (details != null) ...[
const SizedBox(width: 8),
Icon(
Icons.chevron_right,
size: 20,
color: theme.colorScheme.onErrorContainer
.withValues(alpha: 0.7),
),
],
],
),
),
),
),