diff --git a/extensions/dacpac/src/wizard/api/dacFxConfigPage.ts b/extensions/dacpac/src/wizard/api/dacFxConfigPage.ts index b084d114af..c500fb6c5d 100644 --- a/extensions/dacpac/src/wizard/api/dacFxConfigPage.ts +++ b/extensions/dacpac/src/wizard/api/dacFxConfigPage.ts @@ -136,7 +136,7 @@ export abstract class DacFxConfigPage extends BasePage { if (!(this.instance.selectedOperation === Operation.deploy && !this.model.upgradeExisting)) { this.model.database = values[0].name; } - // filename shouldn't change for deploy because the file exists and isn't being generated like for extract and export + // filename shouldn't change for deploy because the file exists and isn't being generated as for extract and export if (this.instance.selectedOperation !== Operation.deploy) { this.model.filePath = this.generateFilePathFromDatabaseAndTimestamp(); this.fileTextBox.value = this.model.filePath; @@ -156,7 +156,8 @@ export abstract class DacFxConfigPage extends BasePage { component => isValidBasename(component.value) ) .withProperties({ - required: true + required: true, + ariaLive: 'polite' }).component(); this.fileTextBox.ariaLabel = localize('dacfx.fileLocationAriaLabel', "File Location"); diff --git a/src/sql/azdata.d.ts b/src/sql/azdata.d.ts index 26522d14a5..5d0fc58706 100644 --- a/src/sql/azdata.d.ts +++ b/src/sql/azdata.d.ts @@ -2890,6 +2890,7 @@ declare module 'azdata' { export interface InputBoxProperties extends ComponentProperties { value?: string; ariaLabel?: string; + ariaLive?: string; placeHolder?: string; inputType?: InputBoxInputType; required?: boolean; diff --git a/src/sql/base/browser/ui/inputBox/inputBox.ts b/src/sql/base/browser/ui/inputBox/inputBox.ts index 1959ddfd32..b8c4c0f01f 100644 --- a/src/sql/base/browser/ui/inputBox/inputBox.ts +++ b/src/sql/base/browser/ui/inputBox/inputBox.ts @@ -96,6 +96,10 @@ export class InputBox extends vsInputBox { } } + public set ariaLive(value: string) { + this.element.setAttribute('aria-live', value); + } + public isEnabled(): boolean { return !this.inputElement.hasAttribute('disabled'); } diff --git a/src/sql/workbench/api/common/extHostModelView.ts b/src/sql/workbench/api/common/extHostModelView.ts index f4dab4a4f1..564ac737df 100644 --- a/src/sql/workbench/api/common/extHostModelView.ts +++ b/src/sql/workbench/api/common/extHostModelView.ts @@ -767,6 +767,13 @@ class InputBoxWrapper extends ComponentWrapper implements azdata.InputBoxCompone this.setProperty('ariaLabel', v); } + public get ariaLive(): string { + return this.properties['ariaLive']; + } + public set ariaLive(v: string) { + this.setProperty('ariaLabel', v); + } + public get placeHolder(): string { return this.properties['placeHolder']; } diff --git a/src/sql/workbench/browser/modelComponents/inputbox.component.ts b/src/sql/workbench/browser/modelComponents/inputbox.component.ts index 3b1dcff45f..33cf172671 100644 --- a/src/sql/workbench/browser/modelComponents/inputbox.component.ts +++ b/src/sql/workbench/browser/modelComponents/inputbox.component.ts @@ -204,6 +204,9 @@ export default class InputBoxComponent extends ComponentBase implements ICompone } } + if (this.ariaLive) { + input.ariaLive = this.ariaLive; + } input.inputElement.required = this.required; } @@ -226,6 +229,10 @@ export default class InputBoxComponent extends ComponentBase implements ICompone this.setPropertyFromUI((props, value) => props.ariaLabel = value, newValue); } + public get ariaLive() { + return this.getPropertyOrDefault((props) => props.ariaLive, ''); + } + public get placeHolder(): string { return this.getPropertyOrDefault((props) => props.placeHolder, ''); }