diff --git a/extensions/schema-compare/src/dialogs/schemaCompareDialog.ts b/extensions/schema-compare/src/dialogs/schemaCompareDialog.ts index 297e2f8d79..247fb23f92 100644 --- a/extensions/schema-compare/src/dialogs/schemaCompareDialog.ts +++ b/extensions/schema-compare/src/dialogs/schemaCompareDialog.ts @@ -60,7 +60,7 @@ export class SchemaCompareDialog { private targetIsDacpac: boolean; private connectionId: string; private sourceDbEditable: string; - private taregtDbEditable: string; + private targetDbEditable: string; private previousSource: mssql.SchemaCompareEndpointInfo; private previousTarget: mssql.SchemaCompareEndpointInfo; @@ -455,7 +455,7 @@ export class SchemaCompareDialog { let sourcefilled = (this.sourceIsDacpac && this.existsDacpac(this.sourceTextBox.value)) || (!this.sourceIsDacpac && !isNullOrUndefined(this.sourceDatabaseDropdown.value) && this.sourceDatabaseDropdown.values.findIndex(x => this.matchesValue(x, this.sourceDbEditable)) !== -1); let targetfilled = (this.targetIsDacpac && this.existsDacpac(this.targetTextBox.value)) - || (!this.targetIsDacpac && !isNullOrUndefined(this.targetDatabaseDropdown.value) && this.targetDatabaseDropdown.values.findIndex(x => this.matchesValue(x, this.taregtDbEditable)) !== -1); + || (!this.targetIsDacpac && !isNullOrUndefined(this.targetDatabaseDropdown.value) && this.targetDatabaseDropdown.values.findIndex(x => this.matchesValue(x, this.targetDbEditable)) !== -1); return sourcefilled && targetfilled; } @@ -616,7 +616,7 @@ export class SchemaCompareDialog { } ).component(); this.targetDatabaseDropdown.onValueChanged((value) => { - this.taregtDbEditable = value; + this.targetDbEditable = value; this.dialog.okButton.enabled = this.shouldEnableOkayButton(); }); diff --git a/src/sql/workbench/browser/modelComponents/dropdown.component.ts b/src/sql/workbench/browser/modelComponents/dropdown.component.ts index 13e630795e..303a4f384b 100644 --- a/src/sql/workbench/browser/modelComponents/dropdown.component.ts +++ b/src/sql/workbench/browser/modelComponents/dropdown.component.ts @@ -19,6 +19,7 @@ import { attachSelectBoxStyler } from 'vs/platform/theme/common/styler'; import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; @Component({ selector: 'modelview-dropdown', @@ -35,6 +36,7 @@ export default class DropDownComponent extends ComponentBase implements ICompone @Input() modelStore: IModelStore; private _editableDropdown: Dropdown; private _selectBox: SelectBox; + private _isInAccessibilityMode: boolean; @ViewChild('editableDropDown', { read: ElementRef }) private _editableDropDownContainer: ElementRef; @ViewChild('dropDown', { read: ElementRef }) private _dropDownContainer: ElementRef; @@ -42,9 +44,14 @@ export default class DropDownComponent extends ComponentBase implements ICompone @Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef, @Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService, @Inject(IContextViewService) private contextViewService: IContextViewService, - @Inject(forwardRef(() => ElementRef)) el: ElementRef + @Inject(forwardRef(() => ElementRef)) el: ElementRef, + @Inject(IConfigurationService) private readonly configurationService: IConfigurationService ) { super(changeRef, el); + + if (this.configurationService) { + this._isInAccessibilityMode = this.configurationService.getValue('editor.accessibilitySupport') === 'on'; + } } ngOnInit(): void { @@ -112,7 +119,7 @@ export default class DropDownComponent extends ComponentBase implements ICompone this._editableDropdown.ariaLabel = this.ariaLabel; } - if (this.editable) { + if (this.editable && !this._isInAccessibilityMode) { this._editableDropdown.values = this.getValues(); if (this.value) { this._editableDropdown.value = this.getSelectedValue(); @@ -186,11 +193,11 @@ export default class DropDownComponent extends ComponentBase implements ICompone } public getEditableDisplay(): string { - return this.editable ? '' : 'none'; + return this.editable && !this._isInAccessibilityMode ? '' : 'none'; } public getNotEditableDisplay(): string { - return !this.editable ? '' : 'none'; + return !this.editable || this._isInAccessibilityMode ? '' : 'none'; } private set value(newValue: string | azdata.CategoryValue) {