From d6413f87b6dabab9c3979a7bf8659461b057aa93 Mon Sep 17 00:00:00 2001 From: meganrogge Date: Tue, 4 Apr 2023 12:29:35 -0700 Subject: [PATCH] fix #176286 --- .../contrib/notebook/browser/contrib/navigation/arrow.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.ts b/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.ts index d6895d1d8c2..3a27385b426 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.ts @@ -8,6 +8,7 @@ import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { EditorExtensionsRegistry } from 'vs/editor/browser/editorExtensions'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { localize } from 'vs/nls'; +import { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vs/platform/accessibility/common/accessibility'; import { registerAction2 } from 'vs/platform/actions/common/actions'; import { Extensions as ConfigurationExtensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; @@ -38,6 +39,7 @@ registerAction2(class FocusNextCellAction extends NotebookCellAction { super({ id: NOTEBOOK_FOCUS_NEXT_EDITOR, title: localize('cursorMoveDown', 'Focus Next Cell Editor'), + precondition: CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate(), keybinding: [ { when: ContextKeyExpr.and( @@ -101,6 +103,7 @@ registerAction2(class FocusPreviousCellAction extends NotebookCellAction { super({ id: NOTEBOOK_FOCUS_PREVIOUS_EDITOR, title: localize('cursorMoveUp', 'Focus Previous Cell Editor'), + precondition: CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate(), keybinding: [ { when: ContextKeyExpr.and( @@ -385,7 +388,7 @@ Registry.as(ConfigurationExtensions.Configuration).regis 'notebook.navigation.allowNavigateToSurroundingCells': { type: 'boolean', default: true, - markdownDescription: localize('notebook.navigation.allowNavigateToSurroundingCells', "When enabled cursor can navigate to the next/previous cell when the current cursor in the cell editor is at the first/last line.") + markdownDescription: localize('notebook.navigation.allowNavigateToSurroundingCells', "When enabled cursor can navigate to the next/previous cell when the current cursor in the cell editor is at the first/last line. Note that due to accessibility issues, this will be disabled when a screen reader is detected.") } } });