@@ -90,6 +90,8 @@ import { INotebookLoggingService } from 'vs/workbench/contrib/notebook/common/no
9090import { Schemas } from 'vs/base/common/network' ;
9191import { DropIntoEditorController } from 'vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController' ;
9292import { CopyPasteController } from 'vs/editor/contrib/dropOrPasteInto/browser/copyPasteController' ;
93+ import { AccessibilityVerbositySettingId } from 'vs/workbench/contrib/accessibility/browser/accessibilityContribution' ;
94+ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding' ;
9395
9496const $ = DOM . $ ;
9597
@@ -284,6 +286,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
284286 @INotebookExecutionStateService notebookExecutionStateService : INotebookExecutionStateService ,
285287 @IEditorProgressService private editorProgressService : IEditorProgressService ,
286288 @INotebookLoggingService readonly logService : INotebookLoggingService ,
289+ @IKeybindingService readonly keybindingService : IKeybindingService
287290 ) {
288291 super ( ) ;
289292
@@ -851,6 +854,17 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
851854 this . _listDelegate = this . instantiationService . createInstance ( NotebookCellListDelegate ) ;
852855 this . _register ( this . _listDelegate ) ;
853856
857+ const createNotebookAriaLabel = ( ) => {
858+ const keybinding = this . keybindingService . lookupKeybinding ( 'editor.action.accessibilityHelp' ) ?. getLabel ( ) ;
859+
860+ if ( this . configurationService . getValue ( AccessibilityVerbositySettingId . Notebook ) ) {
861+ return keybinding
862+ ? nls . localize ( 'notebookTreeAriaLabelHelp' , "Notebook\nUse {0} for accessibility help" , keybinding )
863+ : nls . localize ( 'notebookTreeAriaLabelHelpNoKb' , "Notebook\nRun the Open Accessibility Help command for more information" , keybinding ) ;
864+ }
865+ return nls . localize ( 'notebookTreeAriaLabel' , "Notebook" ) ;
866+ } ;
867+
854868 this . _list = this . instantiationService . createInstance (
855869 NotebookCellList ,
856870 'NotebookCellList' ,
@@ -904,9 +918,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
904918
905919 return '' ;
906920 } ,
907- getWidgetAriaLabel ( ) {
908- return nls . localize ( 'notebookTreeAriaLabel' , "Notebook" ) ;
909- }
921+ getWidgetAriaLabel : createNotebookAriaLabel
910922 } ,
911923 } ,
912924 ) ;
@@ -987,6 +999,12 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
987999 } ) ) ;
9881000
9891001 this . _registerNotebookActionsToolbar ( ) ;
1002+
1003+ this . _register ( this . configurationService . onDidChangeConfiguration ( e => {
1004+ if ( e . affectsConfiguration ( AccessibilityVerbositySettingId . Notebook ) ) {
1005+ this . _list . ariaLabel = createNotebookAriaLabel ( ) ;
1006+ }
1007+ } ) ) ;
9901008 }
9911009
9921010 private showListContextMenu ( e : IListContextMenuEvent < CellViewModel > ) {
0 commit comments