add names for schema compare dialog (#6856)

This commit is contained in:
Kim Santiago
2019-08-21 15:20:07 -07:00
committed by GitHub
parent b075b035ab
commit 8e668b657c
3 changed files with 16 additions and 5 deletions

View File

@@ -190,7 +190,8 @@ export class SchemaCompareDialog {
this.schemaCompareTab.registerContent(async view => { this.schemaCompareTab.registerContent(async view => {
this.sourceTextBox = view.modelBuilder.inputBox().withProperties({ this.sourceTextBox = view.modelBuilder.inputBox().withProperties({
value: this.schemaCompareResult.sourceEndpointInfo ? this.schemaCompareResult.sourceEndpointInfo.packageFilePath : '', value: this.schemaCompareResult.sourceEndpointInfo ? this.schemaCompareResult.sourceEndpointInfo.packageFilePath : '',
width: 275 width: 275,
ariaLabel: localize('schemaCompareDialog.sourceTextBox', "Source file")
}).component(); }).component();
this.sourceTextBox.onTextChanged((e) => { this.sourceTextBox.onTextChanged((e) => {
@@ -199,7 +200,8 @@ export class SchemaCompareDialog {
this.targetTextBox = view.modelBuilder.inputBox().withProperties({ this.targetTextBox = view.modelBuilder.inputBox().withProperties({
value: this.schemaCompareResult.targetEndpointInfo ? this.schemaCompareResult.targetEndpointInfo.packageFilePath : '', value: this.schemaCompareResult.targetEndpointInfo ? this.schemaCompareResult.targetEndpointInfo.packageFilePath : '',
width: 275 width: 275,
ariaLabel: localize('schemaCompareDialog.targetTextBox', "Target file")
}).component(); }).component();
this.targetTextBox.onTextChanged(() => { this.targetTextBox.onTextChanged(() => {
@@ -464,7 +466,8 @@ export class SchemaCompareDialog {
this.sourceServerDropdown = view.modelBuilder.dropDown().withProperties( this.sourceServerDropdown = view.modelBuilder.dropDown().withProperties(
{ {
editable: true, editable: true,
fireOnTextChange: true fireOnTextChange: true,
ariaLabel: localize('schemaCompareDialog.sourceServerDropdown', "Source Server")
} }
).component(); ).component();
this.sourceServerDropdown.onValueChanged(async (value) => { this.sourceServerDropdown.onValueChanged(async (value) => {
@@ -489,7 +492,8 @@ export class SchemaCompareDialog {
this.targetServerDropdown = view.modelBuilder.dropDown().withProperties( this.targetServerDropdown = view.modelBuilder.dropDown().withProperties(
{ {
editable: true, editable: true,
fireOnTextChange: true fireOnTextChange: true,
ariaLabel: localize('schemaCompareDialog.targetServerDropdown', "Target Server")
} }
).component(); ).component();
this.targetServerDropdown.onValueChanged(async (value) => { this.targetServerDropdown.onValueChanged(async (value) => {
@@ -586,7 +590,8 @@ export class SchemaCompareDialog {
this.sourceDatabaseDropdown = view.modelBuilder.dropDown().withProperties( this.sourceDatabaseDropdown = view.modelBuilder.dropDown().withProperties(
{ {
editable: true, editable: true,
fireOnTextChange: true fireOnTextChange: true,
ariaLabel: localize('schemaCompareDialog.sourceDatabaseDropdown', "Source Database")
} }
).component(); ).component();
this.sourceDatabaseDropdown.onValueChanged((value) => { this.sourceDatabaseDropdown.onValueChanged((value) => {
@@ -605,6 +610,7 @@ export class SchemaCompareDialog {
{ {
editable: true, editable: true,
fireOnTextChange: true, fireOnTextChange: true,
ariaLabel: localize('schemaCompareDialog.targetDatabaseDropdown', "Target Database")
} }
).component(); ).component();
this.targetDatabaseDropdown.onValueChanged((value) => { this.targetDatabaseDropdown.onValueChanged((value) => {

View File

@@ -327,4 +327,8 @@ export class Dropdown extends Disposable {
public get enabled(): boolean { public get enabled(): boolean {
return this._input.isEnabled(); return this._input.isEnabled();
} }
public set ariaLabel(val: string) {
this._input.setAriaLabel(val);
}
} }

View File

@@ -109,6 +109,7 @@ export default class DropDownComponent extends ComponentBase implements ICompone
if (this.ariaLabel !== '') { if (this.ariaLabel !== '') {
this._selectBox.setAriaLabel(this.ariaLabel); this._selectBox.setAriaLabel(this.ariaLabel);
this._editableDropdown.ariaLabel = this.ariaLabel;
} }
if (this.editable) { if (this.editable) {