Skip to content

[web] API to customize semantics placeholder message#178309

Merged
auto-submit[bot] merged 2 commits into
flutter:masterfrom
mdebbar:a11y_placeholder
Nov 12, 2025
Merged

[web] API to customize semantics placeholder message#178309
auto-submit[bot] merged 2 commits into
flutter:masterfrom
mdebbar:a11y_placeholder

Conversation

@mdebbar

@mdebbar mdebbar commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

To customize the accessibility placeholder message:

import 'dart:ui_web' as ui_web;

void main() {
  ui_web.accessibilityPlaceholderMessage = 'My Custom Accessibility Message!';
  // ....
}

Fixes #178172

@mdebbar mdebbar requested a review from yjbanov November 11, 2025 17:17
@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) platform-web Web applications specifically labels Nov 11, 2025

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new API to customize the accessibility placeholder message on the web. The changes involve refactoring SemanticsHelper and its SemanticsEnabler implementations to support dynamic updates to the placeholder's label, replacing the previous hardcoded message. The new API is exposed via ui_web.accessibilityPlaceholderMessage. The changes are well-tested. I've found a missing method implementation in a test class that would cause a compile error, and some missing documentation. Overall, this is a good improvement.

@yjbanov yjbanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mdebbar mdebbar added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 12, 2025
@auto-submit auto-submit Bot added this pull request to the merge queue Nov 12, 2025
Merged via the queue into flutter:master with commit e4d2b87 Nov 12, 2025
184 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 17, 2025
IvoneDjaja pushed a commit to IvoneDjaja/flutter that referenced this pull request Nov 22, 2025
To customize the accessibility placeholder message:

```dart
import 'dart:ui_web' as ui_web;

void main() {
  ui_web.accessibilityPlaceholderMessage = 'My Custom Accessibility Message!';
  // ....
}
```

Fixes flutter#178172
mboetger pushed a commit to mboetger/flutter that referenced this pull request Dec 2, 2025
To customize the accessibility placeholder message:

```dart
import 'dart:ui_web' as ui_web;

void main() {
  ui_web.accessibilityPlaceholderMessage = 'My Custom Accessibility Message!';
  // ....
}
```

Fixes flutter#178172
reidbaker pushed a commit to AbdeMohlbi/flutter that referenced this pull request Dec 10, 2025
To customize the accessibility placeholder message:

```dart
import 'dart:ui_web' as ui_web;

void main() {
  ui_web.accessibilityPlaceholderMessage = 'My Custom Accessibility Message!';
  // ....
}
```

Fixes flutter#178172
@mdebbar mdebbar deleted the a11y_placeholder branch February 10, 2026 17:42
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) engine flutter/engine related. See also e: labels. platform-web Web applications specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[web] No way to set the placeholderMessage value

2 participants