Skip to content

Commit ee1956e

Browse files
committed
1 parent c0be5c4 commit ee1956e

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/vs/workbench/contrib/accessibility/browser/accessibilityContribution.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ export const enum AccessibilityVerbositySettingId {
1111
Terminal = 'accessibility.verbosity.terminal',
1212
DiffEditor = 'accessibility.verbosity.diff-editor',
1313
Chat = 'accessibility.verbosity.chat',
14-
InteractiveEditor = 'accessibility.verbosity.interactiveEditor'
14+
InteractiveEditor = 'accessibility.verbosity.interactiveEditor',
15+
Notebook = 'accessibility.verbosity.notebook'
1516
}
1617

1718
const configuration: IConfigurationNode = {
@@ -42,6 +43,12 @@ const configuration: IConfigurationNode = {
4243
type: 'boolean',
4344
default: true,
4445
tags: ['accessibility']
46+
},
47+
[AccessibilityVerbositySettingId.Notebook]: {
48+
description: localize('verbosity.notebook', 'Provide information about how to focus the cell container or inner editor when a notebook cell is focused.'),
49+
type: 'boolean',
50+
default: true,
51+
tags: ['accessibility']
4552
}
4653
}
4754
};

src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ import { INotebookLoggingService } from 'vs/workbench/contrib/notebook/common/no
9191
import { Schemas } from 'vs/base/common/network';
9292
import { DropIntoEditorController } from 'vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController';
9393
import { CopyPasteController } from 'vs/editor/contrib/dropOrPasteInto/browser/copyPasteController';
94+
import { AccessibilityVerbositySettingId } from 'vs/workbench/contrib/accessibility/browser/accessibilityContribution';
9495

9596
const $ = DOM.$;
9697

@@ -2229,18 +2230,18 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
22292230

22302231
private _cellFocusAria(cell: ICellViewModel, focusItem: 'editor' | 'container' | 'output') {
22312232
const index = this._notebookViewModel?.getCellIndex(cell);
2232-
2233+
const verboseLabel = this.configurationService.getValue(AccessibilityVerbositySettingId.Notebook);
22332234
if (index !== undefined && index >= 0) {
22342235
let position = '';
22352236
switch (focusItem) {
22362237
case 'editor':
2237-
position = `the inner ${cell.cellKind === CellKind.Markup ? 'markdown' : 'code'} editor is focused, press escape to focus the cell container`;
2238+
position = `the inner ${cell.cellKind === CellKind.Markup ? 'markdown' : 'code'} editor is focused` + verboseLabel ? `, press escape to focus the cell container` : '';
22382239
break;
22392240
case 'output':
2240-
position = `the cell output is focused, press escape to focus the cell container`;
2241+
position = `the cell output is focused` + verboseLabel ? `, press escape to focus the cell container` : '';
22412242
break;
22422243
case 'container':
2243-
position = `the ${cell.cellKind === CellKind.Markup ? 'markdown preview' : 'cell container'} is focused, press enter to focus the inner ${cell.cellKind === CellKind.Markup ? 'markdown' : 'code'} editor`;
2244+
position = `the ${cell.cellKind === CellKind.Markup ? 'markdown preview' : 'cell container'} is focused` + verboseLabel ? `, press enter to focus the inner ${cell.cellKind === CellKind.Markup ? 'markdown' : 'code'} editor` : '';
22442245
break;
22452246
default:
22462247
break;

0 commit comments

Comments
 (0)