port vscode changes (#19754)

* add aria-description support for selectbox

* type check
This commit is contained in:
Alan Ren
2022-06-16 13:24:35 -07:00
committed by GitHub
parent e24f316ab7
commit 31dea2f5ee
3 changed files with 1 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ export interface ISelectBoxDelegate extends IDisposable {
export interface ISelectBoxOptions { export interface ISelectBoxOptions {
useCustomDrawn?: boolean; useCustomDrawn?: boolean;
ariaLabel?: string; ariaLabel?: string;
ariaDescription?: string; // {{SQL CARBON EDIT}} - Add aria description ariaDescription?: string;
minBottomMargin?: number; minBottomMargin?: number;
optionsAsChildren?: boolean; optionsAsChildren?: boolean;
} }

View File

@@ -127,7 +127,6 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
this.selectElement.setAttribute('aria-label', this.selectBoxOptions.ariaLabel); this.selectElement.setAttribute('aria-label', this.selectBoxOptions.ariaLabel);
} }
// {{SQL CARBON EDIT}}
if (typeof this.selectBoxOptions.ariaDescription === 'string') { if (typeof this.selectBoxOptions.ariaDescription === 'string') {
this.selectElement.setAttribute('aria-description', this.selectBoxOptions.ariaDescription); this.selectElement.setAttribute('aria-description', this.selectBoxOptions.ariaDescription);
} }

View File

@@ -36,7 +36,6 @@ export class SelectBoxNative extends Disposable implements ISelectBoxDelegate {
this.selectElement.setAttribute('aria-label', this.selectBoxOptions.ariaLabel); this.selectElement.setAttribute('aria-label', this.selectBoxOptions.ariaLabel);
} }
// {{SQL CARBON EDIT}}
if (typeof this.selectBoxOptions.ariaDescription === 'string') { if (typeof this.selectBoxOptions.ariaDescription === 'string') {
this.selectElement.setAttribute('aria-description', this.selectBoxOptions.ariaDescription); this.selectElement.setAttribute('aria-description', this.selectBoxOptions.ariaDescription);
} }