Skip to content

Commit

Permalink
No need for SemanticsService.announce() when headless
Browse files Browse the repository at this point in the history
  • Loading branch information
fdennis committed Oct 25, 2024
1 parent dde475d commit 1034a3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/app/views/user_interaction.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ UserInteractionController promptUserInteraction(
void Function()? onCancel,
bool headless = false,
}) {
String a11yLabel = title + description;
SemanticsService.announce(a11yLabel, TextDirection.ltr);
if (headless) {
// No support for icon or onCancel.
return _notificationUserInteraction(context,
Expand All @@ -159,6 +157,8 @@ UserInteractionController _dialogUserInteraction(
Widget? icon,
void Function()? onCancel,
}) {
String a11yLabel = title + " " + description;
SemanticsService.announce(a11yLabel, TextDirection.ltr);
var completed = false;
var wasPopped = false;
final controller = _UserInteractionController(
Expand Down

0 comments on commit 1034a3a

Please sign in to comment.