From 4d8fdf58334606c42549d82087cf4a8fa49d4930 Mon Sep 17 00:00:00 2001 From: Lucy Zhang Date: Wed, 4 May 2022 10:44:24 -0700 Subject: [PATCH] Have screen reader announce when cell execution is complete (#19249) * add tab index to cell output * add sr-only element to announce cell exe complete * use onExecutionComplete event * remove extra change * simplify alert message * add alert for cell execution start --- src/sql/workbench/services/notebook/browser/models/cell.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sql/workbench/services/notebook/browser/models/cell.ts b/src/sql/workbench/services/notebook/browser/models/cell.ts index 7fd1724e5b..68be80d6e1 100644 --- a/src/sql/workbench/services/notebook/browser/models/cell.ts +++ b/src/sql/workbench/services/notebook/browser/models/cell.ts @@ -35,6 +35,7 @@ import { CellOutputEdit, CellOutputDataEdit } from 'sql/workbench/services/noteb import { ILogService } from 'vs/platform/log/common/log'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ICellMetadata } from 'sql/workbench/api/common/sqlExtHostTypes'; +import { alert } from 'vs/base/browser/ui/aria/aria'; import { CELL_URI_PATH_PREFIX } from 'sql/workbench/common/constants'; let modelId = 0; @@ -606,6 +607,8 @@ export class CellModel extends Disposable implements ICellModel { public async runCell(notificationService?: INotificationService, connectionManagementService?: IConnectionManagementService): Promise { try { + // Allow screen reader to announce when cell execution is started + alert(localize('cellExecutionStarted', "Cell execution started")); if (!this.active && this !== this.notebookModel.activeCell) { this.notebookModel.updateActiveCell(this); this.active = true; @@ -714,6 +717,8 @@ export class CellModel extends Disposable implements ICellModel { // Serialize cell output once the cell is done executing this.sendChangeToNotebook(NotebookChangeType.CellOutputUpdated); this.notifyExecutionComplete(); + // Allow screen reader to announce when a cell is done running + alert(localize('cellExecutionComplete', "Cell execution is complete")); } return true;