implemented comprehensive accessibility (A11y) support across the app
This commit is contained in:
@@ -33,6 +33,7 @@ class FilesSearchDelegate extends SearchDelegate<void> {
|
||||
@override
|
||||
Widget? buildLeading(BuildContext context) => IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
tooltip: 'Zurück',
|
||||
onPressed: () => close(context, null),
|
||||
);
|
||||
|
||||
|
||||
@@ -239,6 +239,7 @@ class _ShareOptionsBodyState extends State<_ShareOptionsBody> {
|
||||
),
|
||||
trailing: IconButton(
|
||||
onPressed: () => copyToClipboard(context, _share.url!),
|
||||
tooltip: 'Link kopieren',
|
||||
icon: const Icon(Icons.copy_outlined),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -127,6 +127,7 @@ class _ShareePickerPageState extends State<ShareePickerPage> {
|
||||
? null
|
||||
: IconButton(
|
||||
icon: const Icon(Icons.clear),
|
||||
tooltip: 'Leeren',
|
||||
onPressed: () {
|
||||
_searchController.clear();
|
||||
_query = '';
|
||||
|
||||
@@ -166,6 +166,7 @@ class _ElementPickerPageState extends State<ElementPickerPage> {
|
||||
? null
|
||||
: IconButton(
|
||||
icon: const Icon(Icons.clear),
|
||||
tooltip: 'Leeren',
|
||||
onPressed: () {
|
||||
_searchController.clear();
|
||||
setState(() => _query = '');
|
||||
|
||||
@@ -35,6 +35,7 @@ class GradeAveragesListView extends StatelessWidget {
|
||||
Text(getGradeDisplay(grade)),
|
||||
const SizedBox(width: 30),
|
||||
IconButton(
|
||||
tooltip: 'Note entfernen',
|
||||
onPressed: () {
|
||||
bloc.add(DecrementGrade(grade));
|
||||
},
|
||||
@@ -49,6 +50,7 @@ class GradeAveragesListView extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: 'Note hinzufügen',
|
||||
onPressed: () {
|
||||
bloc.add(IncrementGrade(grade));
|
||||
},
|
||||
@@ -64,6 +66,7 @@ class GradeAveragesListView extends StatelessWidget {
|
||||
maintainSize: true,
|
||||
visible: bloc.canDecrementOrDelete(grade),
|
||||
child: IconButton(
|
||||
tooltip: 'Löschen',
|
||||
icon: const Icon(Icons.delete),
|
||||
onPressed: () {
|
||||
bloc.add(ResetGrade(grade));
|
||||
|
||||
@@ -24,6 +24,7 @@ class GradeAveragesView extends StatelessWidget {
|
||||
Visibility(
|
||||
visible: bloc.state.grades.isNotEmpty,
|
||||
child: IconButton(
|
||||
tooltip: 'Alle zurücksetzen',
|
||||
onPressed: () => ConfirmDialog(
|
||||
title: 'Zurücksetzen?',
|
||||
content: 'Alle Einträge werden entfernt.',
|
||||
|
||||
@@ -38,6 +38,7 @@ class HolidaysView extends StatelessWidget {
|
||||
title: const Text('Schulferien'),
|
||||
actions: [
|
||||
IconButton(
|
||||
tooltip: 'Informationen',
|
||||
icon: const Icon(Icons.info_outline),
|
||||
onPressed: showDisclaimer,
|
||||
),
|
||||
|
||||
@@ -68,6 +68,7 @@ class MarianumDatesView extends StatelessWidget {
|
||||
onSelected: (e) => bloc.add(SetPastEventsVisible(e)),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: 'Suchen',
|
||||
icon: const Icon(Icons.search),
|
||||
onPressed: () {
|
||||
final events = bloc.getEvents() ?? const <MarianumDate>[];
|
||||
|
||||
@@ -22,11 +22,16 @@ class SearchMarianumDates extends SearchDelegate<MarianumDate?> {
|
||||
@override
|
||||
List<Widget>? buildActions(BuildContext context) => [
|
||||
if (query.isNotEmpty)
|
||||
IconButton(onPressed: () => query = '', icon: const Icon(Icons.clear)),
|
||||
IconButton(
|
||||
tooltip: 'Leeren',
|
||||
onPressed: () => query = '',
|
||||
icon: const Icon(Icons.clear),
|
||||
),
|
||||
];
|
||||
|
||||
@override
|
||||
Widget? buildLeading(BuildContext context) => IconButton(
|
||||
tooltip: 'Zurück',
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () => close(context, null),
|
||||
);
|
||||
|
||||
@@ -22,6 +22,7 @@ class MarianumMessageListView extends StatelessWidget {
|
||||
title: const Text('Marianum Message'),
|
||||
actions: [
|
||||
IconButton(
|
||||
tooltip: 'Suchen',
|
||||
icon: const Icon(Icons.search),
|
||||
onPressed: () {
|
||||
final list = bloc.state.data?.messageList;
|
||||
|
||||
@@ -23,11 +23,16 @@ class SearchMarianumMessages extends SearchDelegate<MarianumMessage?> {
|
||||
@override
|
||||
List<Widget>? buildActions(BuildContext context) => [
|
||||
if (query.isNotEmpty)
|
||||
IconButton(onPressed: () => query = '', icon: const Icon(Icons.clear)),
|
||||
IconButton(
|
||||
tooltip: 'Leeren',
|
||||
onPressed: () => query = '',
|
||||
icon: const Icon(Icons.clear),
|
||||
),
|
||||
];
|
||||
|
||||
@override
|
||||
Widget? buildLeading(BuildContext context) => IconButton(
|
||||
tooltip: 'Zurück',
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () => close(context, null),
|
||||
);
|
||||
|
||||
@@ -1,18 +1,24 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:photo_view/photo_view.dart';
|
||||
|
||||
import '../../../../widget/a11y/a11y_labels.dart';
|
||||
|
||||
class Roomplan extends StatelessWidget {
|
||||
const Roomplan({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Scaffold(
|
||||
appBar: AppBar(title: const Text('Raumplan')),
|
||||
body: PhotoView(
|
||||
imageProvider: Image.asset('assets/img/raumplan.png').image,
|
||||
minScale: 0.5,
|
||||
maxScale: 2.0,
|
||||
backgroundDecoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
body: Semantics(
|
||||
image: true,
|
||||
label: A11yLabels.roomPlan,
|
||||
child: PhotoView(
|
||||
imageProvider: Image.asset('assets/img/raumplan.png').image,
|
||||
minScale: 0.5,
|
||||
maxScale: 2.0,
|
||||
backgroundDecoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -23,6 +23,7 @@ class _OverhangState extends State<Overhang> {
|
||||
title: const Text('Mehr'),
|
||||
actions: [
|
||||
IconButton(
|
||||
tooltip: 'Einstellungen',
|
||||
onPressed: () => AppRoutes.openSettings(context),
|
||||
icon: const Icon(Icons.settings),
|
||||
),
|
||||
|
||||
@@ -66,6 +66,7 @@ class ModuleSortBody extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
IconButton(
|
||||
tooltip: 'Slot entfernen',
|
||||
icon: const Icon(Icons.remove_circle_outline),
|
||||
onPressed:
|
||||
modulesSettings.fixedBottomBarSlots >
|
||||
@@ -80,6 +81,7 @@ class ModuleSortBody extends StatelessWidget {
|
||||
),
|
||||
Text('${modulesSettings.fixedBottomBarSlots}'),
|
||||
IconButton(
|
||||
tooltip: 'Slot hinzufügen',
|
||||
icon: const Icon(Icons.add_circle_outline),
|
||||
onPressed:
|
||||
modulesSettings.fixedBottomBarSlots <
|
||||
|
||||
@@ -277,13 +277,22 @@ class _PushStatusBodyState extends State<_PushStatusBody>
|
||||
Widget _stateIcon(PushCheck state, ThemeData theme) {
|
||||
switch (state) {
|
||||
case PushCheck.ok:
|
||||
return const Icon(Icons.check_circle_outline, color: Colors.green);
|
||||
return const Icon(
|
||||
Icons.check_circle_outline,
|
||||
color: Colors.green,
|
||||
semanticLabel: 'In Ordnung',
|
||||
);
|
||||
case PushCheck.fail:
|
||||
return Icon(Icons.cancel_outlined, color: theme.colorScheme.error);
|
||||
return Icon(
|
||||
Icons.cancel_outlined,
|
||||
color: theme.colorScheme.error,
|
||||
semanticLabel: 'Fehler',
|
||||
);
|
||||
case PushCheck.unknown:
|
||||
return Icon(
|
||||
Icons.remove_circle_outline,
|
||||
color: theme.colorScheme.onSurfaceVariant,
|
||||
semanticLabel: 'Unbekannt',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@ class ShareChatPicker extends StatelessWidget {
|
||||
actions: [
|
||||
Builder(
|
||||
builder: (ctx) => IconButton(
|
||||
tooltip: 'Suchen',
|
||||
icon: const Icon(Icons.search),
|
||||
onPressed: () {
|
||||
final rooms = ctx.read<ChatListBloc>().state.data?.rooms;
|
||||
|
||||
@@ -85,6 +85,7 @@ class _ChatListViewState extends State<_ChatListView> {
|
||||
title: const Text('Talk'),
|
||||
actions: [
|
||||
IconButton(
|
||||
tooltip: 'Suchen',
|
||||
icon: const Icon(Icons.search),
|
||||
onPressed: () {
|
||||
final rooms = bloc.state.data?.rooms;
|
||||
|
||||
@@ -27,7 +27,11 @@ class JoinChat extends SearchDelegate<String> {
|
||||
},
|
||||
),
|
||||
if (query.isNotEmpty)
|
||||
IconButton(onPressed: () => query = '', icon: const Icon(Icons.clear)),
|
||||
IconButton(
|
||||
tooltip: 'Leeren',
|
||||
onPressed: () => query = '',
|
||||
icon: const Icon(Icons.clear),
|
||||
),
|
||||
];
|
||||
|
||||
@override
|
||||
|
||||
@@ -25,7 +25,11 @@ class SearchChat extends SearchDelegate<GetRoomResponseObject?> {
|
||||
@override
|
||||
List<Widget>? buildActions(BuildContext context) => [
|
||||
if (query.isNotEmpty)
|
||||
IconButton(onPressed: () => query = '', icon: const Icon(Icons.clear)),
|
||||
IconButton(
|
||||
tooltip: 'Leeren',
|
||||
onPressed: () => query = '',
|
||||
icon: const Icon(Icons.clear),
|
||||
),
|
||||
];
|
||||
|
||||
@override
|
||||
|
||||
@@ -9,6 +9,7 @@ import '../../../../share_intent/remote_file_ref.dart';
|
||||
import '../../../../state/app/modules/chat/bloc/chat_bloc.dart';
|
||||
import '../../../../utils/downloads/download_job.dart';
|
||||
import '../../../../utils/haptics.dart';
|
||||
import '../../../../widget/a11y/a11y_labels.dart';
|
||||
import '../../../../widget/demo_restricted.dart';
|
||||
import '../../../../widget/downloads/download_trigger.dart';
|
||||
import '../data/chat_bubble_styles.dart';
|
||||
@@ -120,9 +121,7 @@ class _ChatBubbleState extends State<ChatBubble>
|
||||
if (!_rendersAsCommentBubble) {
|
||||
base = styles.getSystemStyle();
|
||||
} else {
|
||||
base = widget.isSender
|
||||
? styles.getSelfStyle()
|
||||
: styles.getRemoteStyle();
|
||||
base = widget.isSender ? styles.getSelfStyle() : styles.getRemoteStyle();
|
||||
}
|
||||
switch (widget.matchHighlight) {
|
||||
case SearchHighlight.none:
|
||||
@@ -130,7 +129,9 @@ class _ChatBubbleState extends State<ChatBubble>
|
||||
case SearchHighlight.secondary:
|
||||
return base.copyWith(
|
||||
borderWidth: 1.5,
|
||||
borderColor: Theme.of(context).colorScheme.primary.withValues(alpha: 0.45),
|
||||
borderColor: Theme.of(
|
||||
context,
|
||||
).colorScheme.primary.withValues(alpha: 0.45),
|
||||
);
|
||||
case SearchHighlight.active:
|
||||
return base.copyWith(
|
||||
@@ -342,68 +343,72 @@ class _BubbleContent extends StatelessWidget {
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Container(
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: MediaQuery.of(context).size.width * 0.9,
|
||||
minWidth: showActorDisplayName
|
||||
? actorText.size.width
|
||||
: timeText.size.width + (isSender ? spacing + timeIconSize : 0) + 3,
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
if (showActorDisplayName) Positioned(top: 0, left: 0, child: actorWidget),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: showBubbleTime ? 18 : 0,
|
||||
top: showActorDisplayName ? 18 : 0,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (parent != null &&
|
||||
bubbleData.messageType ==
|
||||
GetRoomResponseObjectMessageType.comment) ...[
|
||||
AnswerReference(
|
||||
referenceMessage: parent!,
|
||||
selfId: selfId,
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
],
|
||||
messageWidget,
|
||||
],
|
||||
),
|
||||
),
|
||||
if (showBubbleTime)
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
child: Row(
|
||||
Widget build(BuildContext context) => MergeSemantics(
|
||||
child: Container(
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: MediaQuery.of(context).size.width * 0.9,
|
||||
minWidth: showActorDisplayName
|
||||
? actorText.size.width
|
||||
: timeText.size.width + (isSender ? spacing + timeIconSize : 0) + 3,
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
if (showActorDisplayName)
|
||||
Positioned(top: 0, left: 0, child: actorWidget),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: showBubbleTime ? 18 : 0,
|
||||
top: showActorDisplayName ? 18 : 0,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
timeText,
|
||||
if (isSender) ...[
|
||||
SizedBox(width: spacing),
|
||||
Icon(
|
||||
isRead ? Icons.done_all_outlined : Icons.done_outlined,
|
||||
size: timeIconSize,
|
||||
color: timeIconColor,
|
||||
),
|
||||
if (parent != null &&
|
||||
bubbleData.messageType ==
|
||||
GetRoomResponseObjectMessageType.comment) ...[
|
||||
AnswerReference(referenceMessage: parent!, selfId: selfId),
|
||||
const SizedBox(height: 5),
|
||||
],
|
||||
messageWidget,
|
||||
],
|
||||
),
|
||||
),
|
||||
if (downloadJob?.status.value is DownloadInProgress)
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
left: 0,
|
||||
child: LinearProgressIndicator(
|
||||
value: () {
|
||||
final s = downloadJob!.status.value as DownloadInProgress;
|
||||
return s.percent <= 0 ? null : s.percent / 100;
|
||||
}(),
|
||||
if (showBubbleTime)
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
child: Row(
|
||||
children: [
|
||||
timeText,
|
||||
if (isSender) ...[
|
||||
SizedBox(width: spacing),
|
||||
Icon(
|
||||
isRead ? Icons.done_all_outlined : Icons.done_outlined,
|
||||
size: timeIconSize,
|
||||
color: timeIconColor,
|
||||
semanticLabel: isRead
|
||||
? A11yLabels.messageRead
|
||||
: A11yLabels.messageSent,
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
if (downloadJob?.status.value is DownloadInProgress)
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
left: 0,
|
||||
child: LinearProgressIndicator(
|
||||
semanticsLabel: A11yLabels.downloadingFile,
|
||||
value: () {
|
||||
final s = downloadJob!.status.value as DownloadInProgress;
|
||||
return s.percent <= 0 ? null : s.percent / 100;
|
||||
}(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import '../../../../api/marianumcloud/talk/delete_react_message/delete_react_mes
|
||||
import '../../../../api/marianumcloud/talk/react_message/react_message.dart';
|
||||
import '../../../../api/marianumcloud/talk/react_message/react_message_params.dart';
|
||||
import '../../../../api/marianumcloud/talk/room/get_room_response.dart';
|
||||
import '../../../../widget/a11y/a11y_labels.dart';
|
||||
import '../../../../widget/async_action_button.dart';
|
||||
import '../../../../widget/demo_restricted.dart';
|
||||
import '../../../../widget/emoji_text.dart';
|
||||
@@ -41,44 +42,58 @@ class ChatBubbleReactions extends StatelessWidget {
|
||||
children: reactions.entries.map<Widget>((e) {
|
||||
final hasSelfReacted =
|
||||
bubbleData.reactionsSelf?.contains(e.key) ?? false;
|
||||
void toggle() {
|
||||
if (guardDemoAction(context)) return;
|
||||
runWithErrorDialog(context, () async {
|
||||
if (hasSelfReacted) {
|
||||
await DeleteReactMessage(
|
||||
chatToken: chatData.token,
|
||||
messageId: bubbleData.id,
|
||||
params: DeleteReactMessageParams(e.key),
|
||||
).run();
|
||||
} else {
|
||||
await ReactMessage(
|
||||
chatToken: chatData.token,
|
||||
messageId: bubbleData.id,
|
||||
params: ReactMessageParams(e.key),
|
||||
).run();
|
||||
}
|
||||
onChanged(renew: true);
|
||||
});
|
||||
}
|
||||
|
||||
// Ownership (eigene Reaktion) wird visuell nur über die
|
||||
// Hintergrundfarbe transportiert – für den Screenreader ins Label.
|
||||
final label = hasSelfReacted
|
||||
? '${e.key} ${e.value}, ${A11yLabels.yourReaction}'
|
||||
: '${e.key} ${e.value}';
|
||||
return Container(
|
||||
margin: const EdgeInsets.only(right: 2.5, left: 2.5),
|
||||
child: ActionChip(
|
||||
label: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
EmojiText(e.key, size: EmojiText.sizeInline),
|
||||
const SizedBox(width: 4),
|
||||
Text('${e.value}'),
|
||||
],
|
||||
child: Semantics(
|
||||
button: true,
|
||||
label: label,
|
||||
onTap: toggle,
|
||||
child: ExcludeSemantics(
|
||||
child: ActionChip(
|
||||
label: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
EmojiText(e.key, size: EmojiText.sizeInline),
|
||||
const SizedBox(width: 4),
|
||||
Text('${e.value}'),
|
||||
],
|
||||
),
|
||||
visualDensity: const VisualDensity(
|
||||
vertical: VisualDensity.minimumDensity,
|
||||
horizontal: VisualDensity.minimumDensity,
|
||||
),
|
||||
padding: EdgeInsets.zero,
|
||||
backgroundColor: hasSelfReacted
|
||||
? Theme.of(context).primaryColor
|
||||
: null,
|
||||
onPressed: toggle,
|
||||
),
|
||||
),
|
||||
visualDensity: const VisualDensity(
|
||||
vertical: VisualDensity.minimumDensity,
|
||||
horizontal: VisualDensity.minimumDensity,
|
||||
),
|
||||
padding: EdgeInsets.zero,
|
||||
backgroundColor: hasSelfReacted
|
||||
? Theme.of(context).primaryColor
|
||||
: null,
|
||||
onPressed: () {
|
||||
if (guardDemoAction(context)) return;
|
||||
runWithErrorDialog(context, () async {
|
||||
if (hasSelfReacted) {
|
||||
await DeleteReactMessage(
|
||||
chatToken: chatData.token,
|
||||
messageId: bubbleData.id,
|
||||
params: DeleteReactMessageParams(e.key),
|
||||
).run();
|
||||
} else {
|
||||
await ReactMessage(
|
||||
chatToken: chatData.token,
|
||||
messageId: bubbleData.id,
|
||||
params: ReactMessageParams(e.key),
|
||||
).run();
|
||||
}
|
||||
onChanged(renew: true);
|
||||
});
|
||||
},
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
|
||||
@@ -259,6 +259,7 @@ class _ReactionsRowState extends State<_ReactionsRow> {
|
||||
],
|
||||
_groupDivider(context),
|
||||
IconButton(
|
||||
tooltip: 'Reaktion hinzufügen',
|
||||
onPressed: busy ? null : () => _showEmojiPicker(context),
|
||||
style: IconButton.styleFrom(
|
||||
padding: EdgeInsets.zero,
|
||||
|
||||
@@ -30,6 +30,7 @@ class ChatSearchAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
: '${activeIndex + 1}/$matchCount';
|
||||
return AppBar(
|
||||
leading: IconButton(
|
||||
tooltip: 'Zurück',
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: onClose,
|
||||
),
|
||||
@@ -54,10 +55,12 @@ class ChatSearchAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: 'Vorheriges Ergebnis',
|
||||
icon: const Icon(Icons.keyboard_arrow_up),
|
||||
onPressed: onPrevious,
|
||||
),
|
||||
IconButton(
|
||||
tooltip: 'Nächstes Ergebnis',
|
||||
icon: const Icon(Icons.keyboard_arrow_down),
|
||||
onPressed: onNext,
|
||||
),
|
||||
|
||||
@@ -268,6 +268,7 @@ class _ChatTextfieldState extends State<ChatTextfield> {
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: 'Antwort verwerfen',
|
||||
onPressed: () {
|
||||
chatBloc.setReferenceMessageId(null);
|
||||
_setDraftReply(null);
|
||||
|
||||
@@ -14,6 +14,7 @@ import '../../../../routing/app_routes.dart';
|
||||
import '../../../../state/app/modules/chat/bloc/chat_bloc.dart';
|
||||
import '../../../../state/app/modules/chat_list/bloc/chat_list_bloc.dart';
|
||||
import '../../../../utils/haptics.dart';
|
||||
import '../../../../widget/a11y/a11y_labels.dart';
|
||||
import '../../../../widget/async_action_button.dart';
|
||||
import '../../../../widget/confirm_dialog.dart';
|
||||
import '../../../../widget/debug/debug_tile.dart';
|
||||
@@ -106,6 +107,7 @@ class _ChatTileState extends State<ChatTile> {
|
||||
Icons.star,
|
||||
color: Colors.amberAccent,
|
||||
size: 15,
|
||||
semanticLabel: A11yLabels.favorite,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -123,7 +125,11 @@ class _ChatTileState extends State<ChatTile> {
|
||||
),
|
||||
if (widget.hasDraft) ...[
|
||||
const SizedBox(width: 5),
|
||||
const Icon(Icons.edit_outlined, size: 15),
|
||||
const Icon(
|
||||
Icons.edit_outlined,
|
||||
size: 15,
|
||||
semanticLabel: A11yLabels.draft,
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
@@ -134,17 +140,25 @@ class _ChatTileState extends State<ChatTile> {
|
||||
),
|
||||
trailing: widget.data.unreadMessages <= 0
|
||||
? null
|
||||
: Container(
|
||||
padding: const EdgeInsets.all(1),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).primaryColor,
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
constraints: const BoxConstraints(minWidth: 20, minHeight: 20),
|
||||
child: Text(
|
||||
'${widget.data.unreadMessages}',
|
||||
style: const TextStyle(color: Colors.white, fontSize: 15),
|
||||
textAlign: TextAlign.center,
|
||||
: Semantics(
|
||||
label: '${widget.data.unreadMessages} ${A11yLabels.unread}',
|
||||
child: ExcludeSemantics(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(1),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).primaryColor,
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: 20,
|
||||
minHeight: 20,
|
||||
),
|
||||
child: Text(
|
||||
'${widget.data.unreadMessages}',
|
||||
style: const TextStyle(color: Colors.white, fontSize: 15),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
|
||||
@@ -16,7 +16,10 @@ class SplitViewPlaceholder extends StatelessWidget {
|
||||
data: MediaQuery.of(
|
||||
context,
|
||||
).copyWith(invertColors: !AppTheme.isDarkMode(context)),
|
||||
child: Image.asset('assets/logo/icon.png', height: 200),
|
||||
// Dekoratives Logo – der „Talk"-Text darunter trägt die Aussage.
|
||||
child: ExcludeSemantics(
|
||||
child: Image.asset('assets/logo/icon.png', height: 200),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
const Text(
|
||||
|
||||
@@ -27,6 +27,7 @@ class CustomEventsView extends StatelessWidget {
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.add),
|
||||
tooltip: 'Termin erstellen',
|
||||
onPressed: () => _openCreateDialog(context),
|
||||
),
|
||||
],
|
||||
@@ -67,6 +68,7 @@ class CustomEventsView extends StatelessWidget {
|
||||
children: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.edit_outlined),
|
||||
tooltip: 'Bearbeiten',
|
||||
onPressed: () => showDialog(
|
||||
context: context,
|
||||
builder: (_) =>
|
||||
@@ -75,6 +77,7 @@ class CustomEventsView extends StatelessWidget {
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.delete_outline),
|
||||
tooltip: 'Löschen',
|
||||
onPressed: () =>
|
||||
showDeleteCustomEventDialog(context, e),
|
||||
),
|
||||
|
||||
@@ -103,6 +103,7 @@ class LessonSheet {
|
||||
static Widget _roomTile(BuildContext context, McTimetableEntry lesson) {
|
||||
final trailing = IconButton(
|
||||
icon: const Icon(Icons.house_outlined),
|
||||
tooltip: 'Raumplan öffnen',
|
||||
onPressed: () => AppRoutes.openRoomplan(context),
|
||||
);
|
||||
|
||||
|
||||
@@ -14,12 +14,17 @@ class SearchSubjectColors extends SearchDelegate<void> {
|
||||
@override
|
||||
List<Widget>? buildActions(BuildContext context) => [
|
||||
if (query.isNotEmpty)
|
||||
IconButton(onPressed: () => query = '', icon: const Icon(Icons.clear)),
|
||||
IconButton(
|
||||
onPressed: () => query = '',
|
||||
tooltip: 'Leeren',
|
||||
icon: const Icon(Icons.clear),
|
||||
),
|
||||
];
|
||||
|
||||
@override
|
||||
Widget? buildLeading(BuildContext context) => IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
tooltip: 'Zurück',
|
||||
onPressed: () => close(context, null),
|
||||
);
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ class SubjectColorsView extends StatelessWidget {
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.search),
|
||||
tooltip: 'Suchen',
|
||||
onPressed: () =>
|
||||
showSearch(context: context, delegate: SearchSubjectColors()),
|
||||
),
|
||||
|
||||
@@ -110,6 +110,7 @@ class _TimetableState extends State<Timetable> {
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.home_outlined),
|
||||
tooltip: 'Zur aktuellen Woche',
|
||||
onPressed: atToday ? null : _jumpToToday,
|
||||
),
|
||||
PopupMenuButton<_CalendarAction>(
|
||||
@@ -179,6 +180,7 @@ class _TimetableState extends State<Timetable> {
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.home_outlined),
|
||||
tooltip: 'Zur aktuellen Woche',
|
||||
onPressed: atToday ? null : _jumpToToday,
|
||||
),
|
||||
if (canViewForeign)
|
||||
|
||||
@@ -88,7 +88,7 @@ class _OutsideDayColumn extends StatelessWidget {
|
||||
}
|
||||
|
||||
static String _subtitleFor(Appointment a) {
|
||||
if (isAllDayLike(a)) return 'Ganztägig';
|
||||
if (isAllDayLike(a)) return A11yLabels.allDay;
|
||||
return '${a.startTime.formatHm()}–${a.endTime.formatHm()}';
|
||||
}
|
||||
|
||||
@@ -122,6 +122,7 @@ class _OutsideDayColumn extends StatelessWidget {
|
||||
height: kOutsideChipHeight,
|
||||
child: _OutsideChip(
|
||||
appointment: visible[i],
|
||||
crossedOut: isCrossedOut(visible[i]),
|
||||
onTap: () => onAppointmentTap(visible[i]),
|
||||
),
|
||||
),
|
||||
@@ -144,15 +145,28 @@ class _OutsideDayColumn extends StatelessWidget {
|
||||
|
||||
class _OutsideChip extends StatelessWidget {
|
||||
final Appointment appointment;
|
||||
final bool crossedOut;
|
||||
final VoidCallback onTap;
|
||||
|
||||
const _OutsideChip({required this.appointment, required this.onTap});
|
||||
const _OutsideChip({
|
||||
required this.appointment,
|
||||
required this.crossedOut,
|
||||
required this.onTap,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final allDay = isAllDayLike(appointment);
|
||||
final timeLabel = allDay ? null : appointment.startTime.formatHm();
|
||||
final semanticsLabel = [
|
||||
appointment.subject,
|
||||
if (allDay)
|
||||
A11yLabels.allDay
|
||||
else
|
||||
'${appointment.startTime.formatHm()}–${appointment.endTime.formatHm()}',
|
||||
if (crossedOut) A11yLabels.cancelled,
|
||||
].join(', ');
|
||||
|
||||
// Past chips fade further, future/ongoing ones get a more saturated tint
|
||||
// so the strip no longer reads as one uniform grey block.
|
||||
@@ -163,47 +177,54 @@ class _OutsideChip extends StatelessWidget {
|
||||
: theme.colorScheme.onSurface;
|
||||
final subjectWeight = isPast ? FontWeight.w400 : FontWeight.w600;
|
||||
|
||||
return Material(
|
||||
color: appointment.color.withAlpha(backgroundAlpha),
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(7)),
|
||||
),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 2),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
appointment.subject,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
softWrap: false,
|
||||
style: theme.textTheme.labelSmall?.copyWith(
|
||||
color: subjectColor,
|
||||
fontWeight: subjectWeight,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (timeLabel != null) ...[
|
||||
const SizedBox(width: 4),
|
||||
Flexible(
|
||||
child: Text(
|
||||
timeLabel,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.fade,
|
||||
softWrap: false,
|
||||
style: theme.textTheme.labelSmall?.copyWith(
|
||||
color: theme.colorScheme.onSurfaceVariant,
|
||||
fontSize: 10,
|
||||
return Semantics(
|
||||
button: true,
|
||||
label: semanticsLabel,
|
||||
onTap: onTap,
|
||||
child: ExcludeSemantics(
|
||||
child: Material(
|
||||
color: appointment.color.withAlpha(backgroundAlpha),
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(7)),
|
||||
),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 2),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
appointment.subject,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
softWrap: false,
|
||||
style: theme.textTheme.labelSmall?.copyWith(
|
||||
color: subjectColor,
|
||||
fontWeight: subjectWeight,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
if (timeLabel != null) ...[
|
||||
const SizedBox(width: 4),
|
||||
Flexible(
|
||||
child: Text(
|
||||
timeLabel,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.fade,
|
||||
softWrap: false,
|
||||
style: theme.textTheme.labelSmall?.copyWith(
|
||||
color: theme.colorScheme.onSurfaceVariant,
|
||||
fontSize: 10,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -220,18 +241,25 @@ class _OutsideOverflowChip extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
return Material(
|
||||
color: theme.colorScheme.secondaryContainer,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(6)),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
child: Center(
|
||||
child: Text(
|
||||
'+$count weitere',
|
||||
style: theme.textTheme.labelSmall?.copyWith(
|
||||
color: theme.colorScheme.onSecondaryContainer,
|
||||
fontWeight: FontWeight.w600,
|
||||
return Semantics(
|
||||
button: true,
|
||||
label: A11yLabels.moreAppointments(count),
|
||||
onTap: onTap,
|
||||
child: ExcludeSemantics(
|
||||
child: Material(
|
||||
color: theme.colorScheme.secondaryContainer,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(6)),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
child: Center(
|
||||
child: Text(
|
||||
'+$count weitere',
|
||||
style: theme.textTheme.labelSmall?.copyWith(
|
||||
color: theme.colorScheme.onSecondaryContainer,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -112,6 +112,7 @@ class _PeriodLabel extends StatelessWidget {
|
||||
Icons.coffee_outlined,
|
||||
size: 12,
|
||||
color: secondaryTextColor.withAlpha(180),
|
||||
semanticLabel: A11yLabels.breakTime,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -328,18 +329,39 @@ class _DayColumn extends StatelessWidget {
|
||||
left: cell.lane * width / cell.laneCount,
|
||||
width: width / cell.laneCount,
|
||||
child: switch (cell) {
|
||||
LaidOutAppointment(:final appointment) => GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () => onAppointmentTap(appointment),
|
||||
child: AppointmentTile(
|
||||
appointment: appointment,
|
||||
LaidOutAppointment(:final appointment) => Semantics(
|
||||
button: true,
|
||||
label: A11yLabels.appointmentLabel(
|
||||
subject: appointment.subject,
|
||||
location: appointment.location ?? '',
|
||||
start: appointment.startTime,
|
||||
end: appointment.endTime,
|
||||
crossedOut: isCrossedOut(appointment),
|
||||
),
|
||||
onTap: () => onAppointmentTap(appointment),
|
||||
child: ExcludeSemantics(
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () => onAppointmentTap(appointment),
|
||||
child: AppointmentTile(
|
||||
appointment: appointment,
|
||||
crossedOut: isCrossedOut(appointment),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
LaidOutOverflow(:final appointments) => GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
LaidOutOverflow(:final appointments) => Semantics(
|
||||
button: true,
|
||||
label: A11yLabels.moreAppointments(appointments.length),
|
||||
onTap: () => _showOverflowSheet(context, appointments),
|
||||
child: _OverflowTile(count: appointments.length),
|
||||
child: ExcludeSemantics(
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () =>
|
||||
_showOverflowSheet(context, appointments),
|
||||
child: _OverflowTile(count: appointments.length),
|
||||
),
|
||||
),
|
||||
),
|
||||
},
|
||||
),
|
||||
|
||||
@@ -14,6 +14,7 @@ import 'package:syncfusion_flutter_calendar/calendar.dart';
|
||||
|
||||
import '../../../../extensions/date_time.dart';
|
||||
import '../../../../utils/haptics.dart';
|
||||
import '../../../../widget/a11y/a11y_labels.dart';
|
||||
import '../../../../widget/details_bottom_sheet.dart';
|
||||
import '../data/calendar_layout.dart';
|
||||
import '../data/calendar_logic.dart';
|
||||
|
||||
Reference in New Issue
Block a user