add ariaLive to publish options description (#22338)

* add ariaLive to publish options description

* use correct string and update typings

* update type

* remove comment update

* create type AriaLiveType

* update MockInputBoxComponent with AriaLiveValue

* update azdata-test and add comment
This commit is contained in:
Kim Santiago
2023-03-16 16:08:24 -07:00
committed by GitHub
parent 20cf2489a2
commit 931c44ac41
7 changed files with 20 additions and 14 deletions

2
src/sql/azdata.d.ts vendored
View File

@@ -3574,7 +3574,7 @@ declare module 'azdata' {
export interface InputBoxProperties extends ComponentProperties {
value?: string | undefined;
ariaLive?: string | undefined;
ariaLive?: AriaLiveValue | undefined;
placeHolder?: string | undefined;
inputType?: InputBoxInputType | undefined;
required?: boolean | undefined;

View File

@@ -1804,9 +1804,14 @@ declare module 'azdata' {
/**
* Corresponds to the aria-live accessibility attribute for this component
*/
ariaLive?: string;
ariaLive?: AriaLiveValue
}
/**
* Supported values for aria-live accessibility attribute
*/
export type AriaLiveValue = 'polite' | 'assertive' | 'off';
export interface ContainerBuilder<TComponent extends Component, TLayout, TItemLayout, TPropertyBag extends ContainerProperties> extends ComponentBuilder<TComponent, TPropertyBag> {
/**
* Sets the initial set of properties for the container being created
@@ -1819,7 +1824,7 @@ declare module 'azdata' {
/**
* Corresponds to the aria-live accessibility attribute for this component
*/
ariaLive?: string;
ariaLive?: AriaLiveValue
}
export namespace queryeditor {

View File

@@ -1004,10 +1004,10 @@ class InputBoxWrapper extends ComponentWrapper implements azdata.InputBoxCompone
this.setProperty('value', v);
}
public get ariaLive(): string {
public get ariaLive(): azdata.AriaLiveValue | undefined {
return this.properties['ariaLive'];
}
public set ariaLive(v: string) {
public set ariaLive(v: azdata.AriaLiveValue | undefined) {
this.setProperty('ariaLive', v);
}
@@ -1392,11 +1392,11 @@ class TextComponentWrapper extends ComponentWrapper implements azdata.TextCompon
this.setProperty('textType', type);
}
public get ariaLive(): string | undefined {
public get ariaLive(): azdata.AriaLiveValue | undefined {
return this.properties['ariaLive'];
}
public set ariaLive(ariaLive: string | undefined) {
public set ariaLive(ariaLive: azdata.AriaLiveValue | undefined) {
this.setProperty('ariaLive', ariaLive);
}
}