diff --git a/src/sql/base/browser/ui/checkbox/checkbox.component.ts b/src/sql/base/browser/ui/checkbox/checkbox.component.ts index 015e03a444..dfabab6a53 100644 --- a/src/sql/base/browser/ui/checkbox/checkbox.component.ts +++ b/src/sql/base/browser/ui/checkbox/checkbox.component.ts @@ -20,7 +20,7 @@ export class Checkbox implements OnInit, OnChanges { @Input() label: string; @Input() enabled = true; @Input() checked = true; - @Input() private ariaLabel: string; + @Input('aria-label') private ariaLabel: string; @Output() onChange = new EventEmitter(); diff --git a/src/sql/base/browser/ui/inputBox/inputBox.component.ts b/src/sql/base/browser/ui/inputBox/inputBox.component.ts index 4684eb1fc0..40f57cc079 100644 --- a/src/sql/base/browser/ui/inputBox/inputBox.component.ts +++ b/src/sql/base/browser/ui/inputBox/inputBox.component.ts @@ -15,7 +15,6 @@ import { AngularDisposable } from 'sql/base/common/lifecycle'; import { attachInputBoxStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; @Component({ @@ -29,7 +28,7 @@ export class InputBox extends AngularDisposable implements OnInit, OnChanges { @Input() max: string; @Input() type: string; @Input() placeholder: string; - @Input() ariaLabel: string; + @Input('aria-label') ariaLabel: string; @Input() value: string; @Output() onDidChange = new EventEmitter(); diff --git a/src/sql/base/browser/ui/modal/optionsDialogHelper.ts b/src/sql/base/browser/ui/modal/optionsDialogHelper.ts index aeb60d6af5..764595357f 100644 --- a/src/sql/base/browser/ui/modal/optionsDialogHelper.ts +++ b/src/sql/base/browser/ui/modal/optionsDialogHelper.ts @@ -49,7 +49,7 @@ export function createOptionElement(option: sqlops.ServiceOption, rowContainer: optionWidget.value = optionValue; inputElement = findElement(rowContainer, 'input'); } else if (option.valueType === ServiceOptionType.category || option.valueType === ServiceOptionType.boolean) { - optionWidget = new SelectBox(possibleInputs, optionValue.toString(), contextViewService); + optionWidget = new SelectBox(possibleInputs, optionValue.toString(), contextViewService, undefined, { ariaLabel: option.displayName }); DialogHelper.appendInputSelectBox(rowContainer, optionWidget); inputElement = findElement(rowContainer, 'monaco-select-box'); } else if (option.valueType === ServiceOptionType.string || option.valueType === ServiceOptionType.password) { diff --git a/src/sql/base/browser/ui/selectBox/selectBox.component.ts b/src/sql/base/browser/ui/selectBox/selectBox.component.ts index 22bc80c7e9..04b6e82e4b 100644 --- a/src/sql/base/browser/ui/selectBox/selectBox.component.ts +++ b/src/sql/base/browser/ui/selectBox/selectBox.component.ts @@ -28,6 +28,7 @@ export class SelectBox extends AngularDisposable implements OnInit, OnChanges { @Input() options: string[]; @Input() selectedOption: string; @Input() onlyEmitOnChange = false; + @Input('aria-label') ariaLabel: string; @Output() onDidSelect = new EventEmitter(); @@ -42,7 +43,7 @@ export class SelectBox extends AngularDisposable implements OnInit, OnChanges { } ngOnInit(): void { - this._selectbox = new vsSelectBox(this.options, this.selectedOption, this.contextViewService); + this._selectbox = new vsSelectBox(this.options, this.selectedOption, this.contextViewService, undefined, { ariaLabel: this.ariaLabel }); this._selectbox.render(this._el.nativeElement); this._selectbox.onDidSelect(e => { if (this.onlyEmitOnChange) { diff --git a/src/sql/base/browser/ui/selectBox/selectBox.ts b/src/sql/base/browser/ui/selectBox/selectBox.ts index 17f07002f5..3dc848cf3e 100644 --- a/src/sql/base/browser/ui/selectBox/selectBox.ts +++ b/src/sql/base/browser/ui/selectBox/selectBox.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { SelectBox as vsSelectBox, ISelectBoxStyles as vsISelectBoxStyles } from 'vs/base/browser/ui/selectBox/selectBox'; +import { SelectBox as vsSelectBox, ISelectBoxStyles as vsISelectBoxStyles, ISelectBoxOptions } from 'vs/base/browser/ui/selectBox/selectBox'; import { Color } from 'vs/base/common/color'; import { IContextViewProvider, AnchorAlignment } from 'vs/base/browser/ui/contextview/contextview'; import * as dom from 'vs/base/browser/dom'; @@ -46,8 +46,8 @@ export class SelectBox extends vsSelectBox { private inputValidationErrorBackground: Color; private element: HTMLElement; - constructor(options: string[], selectedOption: string, contextViewProvider: IContextViewProvider, container?: HTMLElement) { - super(options, 0, contextViewProvider); + constructor(options: string[], selectedOption: string, contextViewProvider: IContextViewProvider, container?: HTMLElement, selectBoxOptions?: ISelectBoxOptions) { + super(options, 0, contextViewProvider, undefined, selectBoxOptions); this._optionsDictionary = new Array(); for (var i = 0; i < options.length; i++) { this._optionsDictionary[options[i]] = i; diff --git a/src/sql/parts/grid/views/query/chartViewer.component.html b/src/sql/parts/grid/views/query/chartViewer.component.html index 0a6cba759f..becd216447 100644 --- a/src/sql/parts/grid/views/query/chartViewer.component.html +++ b/src/sql/parts/grid/views/query/chartViewer.component.html @@ -7,9 +7,9 @@
-
{{localizedStrings.CHART_TYPE}}
+
{{localizedStrings.CHART_TYPE}}
{{localizedStrings.LEGEND}}
- {{localizedStrings.Y_AXIS_LABEL}} - +
{{localizedStrings.Y_AXIS_MAX_VAL}} - + {{localizedStrings.Y_AXIS_MIN_VAL}} - + @@ -237,17 +243,22 @@ {{localizedStrings.X_AXIS_LABEL}} - + {{localizedStrings.X_AXIS_MAX_VAL}} - + {{localizedStrings.X_AXIS_MIN_VAL}} - + diff --git a/src/vs/base/browser/ui/selectBox/selectBox.ts b/src/vs/base/browser/ui/selectBox/selectBox.ts index 16fcb2ca7b..b03c030a6f 100644 --- a/src/vs/base/browser/ui/selectBox/selectBox.ts +++ b/src/vs/base/browser/ui/selectBox/selectBox.ts @@ -35,6 +35,8 @@ export interface ISelectBoxDelegate { } export interface ISelectBoxOptions { + // {{SQL CARBON EDIT}} + ariaLabel?: string; minBottomMargin?: number; } @@ -76,7 +78,8 @@ export class SelectBox extends Widget implements ISelectBoxDelegate { // Instantiate select implementation based on platform if (isMacintosh) { - this.selectBoxDelegate = new SelectBoxNative(options, selected, styles); + // {{SQL CARBON EDIT}} + this.selectBoxDelegate = new SelectBoxNative(options, selected, styles, selectBoxOptions); } else { this.selectBoxDelegate = new SelectBoxList(options, selected, contextViewProvider, styles, selectBoxOptions); } diff --git a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts index 1d0409c458..671bcd3f04 100644 --- a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts +++ b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts @@ -110,6 +110,11 @@ export class SelectBoxList implements ISelectBoxDelegate, IDelegate(); this.styles = styles; diff --git a/src/vs/base/browser/ui/selectBox/selectBoxNative.ts b/src/vs/base/browser/ui/selectBox/selectBoxNative.ts index 45b6d8c6a5..7c4527606a 100644 --- a/src/vs/base/browser/ui/selectBox/selectBoxNative.ts +++ b/src/vs/base/browser/ui/selectBox/selectBoxNative.ts @@ -8,7 +8,7 @@ import { Event, Emitter } from 'vs/base/common/event'; import { KeyCode } from 'vs/base/common/keyCodes'; import * as dom from 'vs/base/browser/dom'; import * as arrays from 'vs/base/common/arrays'; -import { ISelectBoxDelegate, ISelectBoxStyles, ISelectData } from 'vs/base/browser/ui/selectBox/selectBox'; +import { ISelectBoxDelegate, ISelectBoxStyles, ISelectData, ISelectBoxOptions } from 'vs/base/browser/ui/selectBox/selectBox'; import { isMacintosh } from 'vs/base/common/platform'; export class SelectBoxNative implements ISelectBoxDelegate { @@ -21,13 +21,19 @@ export class SelectBoxNative implements ISelectBoxDelegate { private toDispose: IDisposable[]; private styles: ISelectBoxStyles; - constructor(options: string[], selected: number, styles: ISelectBoxStyles) { + // {{SQL CARBON EDIT}} + constructor(options: string[], selected: number, styles: ISelectBoxStyles, selectBoxOptions?: ISelectBoxOptions) { this.toDispose = []; this.selectElement = document.createElement('select'); this.selectElement.className = 'monaco-select-box'; + // {{SQL CARBON EDIT}} + if (selectBoxOptions && selectBoxOptions.ariaLabel) { + this.selectElement.setAttribute('aria-label', selectBoxOptions.ariaLabel); + } + this._onDidSelect = new Emitter(); this.styles = styles;