mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
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
This commit is contained in:
@@ -35,6 +35,7 @@ import { CellOutputEdit, CellOutputDataEdit } from 'sql/workbench/services/noteb
|
|||||||
import { ILogService } from 'vs/platform/log/common/log';
|
import { ILogService } from 'vs/platform/log/common/log';
|
||||||
import { IModeService } from 'vs/editor/common/services/modeService';
|
import { IModeService } from 'vs/editor/common/services/modeService';
|
||||||
import { ICellMetadata } from 'sql/workbench/api/common/sqlExtHostTypes';
|
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';
|
import { CELL_URI_PATH_PREFIX } from 'sql/workbench/common/constants';
|
||||||
|
|
||||||
let modelId = 0;
|
let modelId = 0;
|
||||||
@@ -606,6 +607,8 @@ export class CellModel extends Disposable implements ICellModel {
|
|||||||
|
|
||||||
public async runCell(notificationService?: INotificationService, connectionManagementService?: IConnectionManagementService): Promise<boolean> {
|
public async runCell(notificationService?: INotificationService, connectionManagementService?: IConnectionManagementService): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
|
// Allow screen reader to announce when cell execution is started
|
||||||
|
alert(localize('cellExecutionStarted', "Cell execution started"));
|
||||||
if (!this.active && this !== this.notebookModel.activeCell) {
|
if (!this.active && this !== this.notebookModel.activeCell) {
|
||||||
this.notebookModel.updateActiveCell(this);
|
this.notebookModel.updateActiveCell(this);
|
||||||
this.active = true;
|
this.active = true;
|
||||||
@@ -714,6 +717,8 @@ export class CellModel extends Disposable implements ICellModel {
|
|||||||
// Serialize cell output once the cell is done executing
|
// Serialize cell output once the cell is done executing
|
||||||
this.sendChangeToNotebook(NotebookChangeType.CellOutputUpdated);
|
this.sendChangeToNotebook(NotebookChangeType.CellOutputUpdated);
|
||||||
this.notifyExecutionComplete();
|
this.notifyExecutionComplete();
|
||||||
|
// Allow screen reader to announce when a cell is done running
|
||||||
|
alert(localize('cellExecutionComplete', "Cell execution is complete"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user