commit | d4f01d4c6c6562f1df0273131459a9575bad0603 | [log] [tgz] |
---|---|---|
author | Ergun Erdogmus <[email protected]> | Mon Jul 14 16:24:00 2025 |
committer | Devtools-frontend LUCI CQ <devtools-frontend-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jul 15 08:27:16 2025 |
tree | bef257cdda5f2b5dc5765b452c05eb170cc2cb04 | |
parent | 86e1e2d09f57e2ad83900a11fb56917ad29857f6 [diff] [blame] |
[ARIAUtils] Implement `status` announcements and move to LiveAnnouncer class Implements being able to announce some messages as `status`[1] and as part of this, moves the functionality related to announcements to a `LiveAnnouncer` class so that we can mock out the `alert` and `status` methods to use in tests. Drive-by: * Update DataGridElement.test.ts to stub `alert` method and do assertions based on the calls to this method. Otherwise, it depends on the internal details of the `alert` implementation (it having only one element, and its text content matching to the provided text) [1]: b/401064048 Bug: 431767389 Change-Id: Id36da418135791f6db5842fe4f74865160a4e5c8 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6734611 Commit-Queue: Ergün Erdoğmuş <[email protected]> Reviewed-by: Danil Somsikov <[email protected]>
diff --git a/front_end/panels/network/NetworkLogView.ts b/front_end/panels/network/NetworkLogView.ts index 68847bc..d22148a 100644 --- a/front_end/panels/network/NetworkLogView.ts +++ b/front_end/panels/network/NetworkLogView.ts
@@ -1069,7 +1069,7 @@ this.recordingHint.detach(); this.recordingHint = null; } - UI.ARIAUtils.alert(i18nString(UIStrings.networkDataAvailable)); + UI.ARIAUtils.LiveAnnouncer.alert(i18nString(UIStrings.networkDataAvailable)); } private setHidden(value: boolean): void {