mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 10:12:34 -05:00
Fix accessibility bugs in Chart Viewer and Advanced properties (#2240)
* fix accessibility bugs in chart viewer * add advanced properties * add comments for changes in vs
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -110,6 +110,11 @@ export class SelectBoxList implements ISelectBoxDelegate, IDelegate<ISelectOptio
|
||||
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<ISelectData>();
|
||||
this.styles = styles;
|
||||
|
||||
|
||||
@@ -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<ISelectData>();
|
||||
|
||||
this.styles = styles;
|
||||
|
||||
Reference in New Issue
Block a user