From 0979ce8de6a84c9b9759f135a6b9bb07489d39ff Mon Sep 17 00:00:00 2001 From: Alan Ren Date: Mon, 25 Nov 2019 13:05:00 -0800 Subject: [PATCH] set dropdown aria-label (#8456) --- extensions/resource-deployment/src/ui/modelViewUtils.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/extensions/resource-deployment/src/ui/modelViewUtils.ts b/extensions/resource-deployment/src/ui/modelViewUtils.ts index 780312f93a..209beedbed 100644 --- a/extensions/resource-deployment/src/ui/modelViewUtils.ts +++ b/extensions/resource-deployment/src/ui/modelViewUtils.ts @@ -102,13 +102,14 @@ export function createCheckbox(view: azdata.ModelView, info: { initialValue: boo }).component(); } -export function createDropdown(view: azdata.ModelView, info: { defaultValue?: string | azdata.CategoryValue, values?: string[] | azdata.CategoryValue[], width?: string, editable?: boolean, required?: boolean }): azdata.DropDownComponent { +export function createDropdown(view: azdata.ModelView, info: { defaultValue?: string | azdata.CategoryValue, values?: string[] | azdata.CategoryValue[], width?: string, editable?: boolean, required?: boolean, label: string }): azdata.DropDownComponent { return view.modelBuilder.dropDown().withProperties({ values: info.values, value: info.defaultValue, width: info.width, editable: info.editable, - fireOnTextChange: true + fireOnTextChange: true, + ariaLabel: info.label }).component(); } @@ -271,7 +272,8 @@ function processOptionsTypeField(context: FieldContext): void { defaultValue: context.fieldInfo.defaultValue, width: context.fieldInfo.inputWidth, editable: context.fieldInfo.editable, - required: context.fieldInfo.required + required: context.fieldInfo.required, + label: context.fieldInfo.label }); context.onNewInputComponentCreated(context.fieldInfo.variableName!, dropdown); addLabelInputPairToContainer(context.view, context.components, label, dropdown, context.fieldInfo.labelPosition);