add aria description (#19734)

* add aria description

* type check
This commit is contained in:
Alan Ren
2022-06-15 14:46:49 -07:00
committed by GitHub
parent 1bf99b0802
commit c75e95599f
7 changed files with 38 additions and 6 deletions

View File

@@ -36,6 +36,11 @@ export class SelectBoxNative extends Disposable implements ISelectBoxDelegate {
this.selectElement.setAttribute('aria-label', this.selectBoxOptions.ariaLabel);
}
// {{SQL CARBON EDIT}}
if (typeof this.selectBoxOptions.ariaDescription === 'string') {
this.selectElement.setAttribute('aria-description', this.selectBoxOptions.ariaDescription);
}
this._onDidSelect = this._register(new Emitter<ISelectData>());
this.styles = styles;