mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fixes accessibility for grid (#1592)
* adds neccessary code to read cell value for table cells * formatting
This commit is contained in:
@@ -60,7 +60,7 @@
|
|||||||
"reflect-metadata": "^0.1.8",
|
"reflect-metadata": "^0.1.8",
|
||||||
"rxjs": "5.4.0",
|
"rxjs": "5.4.0",
|
||||||
"semver": "4.3.6",
|
"semver": "4.3.6",
|
||||||
"slickgrid": "github:anthonydresser/SlickGrid#2.3.17",
|
"slickgrid": "github:anthonydresser/SlickGrid#2.3.20",
|
||||||
"spdlog": "0.6.0",
|
"spdlog": "0.6.0",
|
||||||
"sudo-prompt": "^8.0.0",
|
"sudo-prompt": "^8.0.0",
|
||||||
"svg.js": "^2.2.5",
|
"svg.js": "^2.2.5",
|
||||||
|
|||||||
10
src/sql/base/browser/ui/table/utils.ts
Normal file
10
src/sql/base/browser/ui/table/utils.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
export function defaultFormatter<T>(valueProperty: keyof T): Slick.Formatter<T> {
|
||||||
|
return (row: number, cell: number, value: any, columnDef: Slick.Column<T>, dataContext: Slick.SlickData): string => {
|
||||||
|
return value[valueProperty];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -21,7 +21,7 @@ import { IEditDataComponentParams } from 'sql/services/bootstrap/bootstrapParams
|
|||||||
import { GridParentComponent } from 'sql/parts/grid/views/gridParentComponent';
|
import { GridParentComponent } from 'sql/parts/grid/views/gridParentComponent';
|
||||||
import { EditDataGridActionProvider } from 'sql/parts/grid/views/editData/editDataGridActions';
|
import { EditDataGridActionProvider } from 'sql/parts/grid/views/editData/editDataGridActions';
|
||||||
import { error } from 'sql/base/common/log';
|
import { error } from 'sql/base/common/log';
|
||||||
import { clone } from 'sql/base/common/objects';
|
import { clone, mixin } from 'sql/base/common/objects';
|
||||||
import { IQueryEditorService } from 'sql/parts/query/common/queryEditorService';
|
import { IQueryEditorService } from 'sql/parts/query/common/queryEditorService';
|
||||||
import { IBootstrapParams } from 'sql/services/bootstrap/bootstrapService';
|
import { IBootstrapParams } from 'sql/services/bootstrap/bootstrapService';
|
||||||
|
|
||||||
@@ -195,7 +195,11 @@ export class EditDataComponent extends GridParentComponent implements OnInit, On
|
|||||||
let gridData: IGridDataRow[] = result.subset.map(row => {
|
let gridData: IGridDataRow[] = result.subset.map(row => {
|
||||||
self.idMapping[rowIndex] = row.id;
|
self.idMapping[rowIndex] = row.id;
|
||||||
rowIndex++;
|
rowIndex++;
|
||||||
return { values: row.cells, row: row.id };
|
return {
|
||||||
|
values: row.cells.map(c => {
|
||||||
|
return mixin({ ariaLabel: c.displayValue }, c);
|
||||||
|
}), row: row.id
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
// Append a NULL row to the end of gridData
|
// Append a NULL row to the end of gridData
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import { GridActionProvider } from 'sql/parts/grid/views/gridActions';
|
|||||||
import { IQueryComponentParams } from 'sql/services/bootstrap/bootstrapParams';
|
import { IQueryComponentParams } from 'sql/services/bootstrap/bootstrapParams';
|
||||||
import { error } from 'sql/base/common/log';
|
import { error } from 'sql/base/common/log';
|
||||||
import { TabChild } from 'sql/base/browser/ui/panel/tab.component';
|
import { TabChild } from 'sql/base/browser/ui/panel/tab.component';
|
||||||
import { clone } from 'sql/base/common/objects';
|
import { clone, mixin } from 'sql/base/common/objects';
|
||||||
import { IQueryEditorService } from 'sql/parts/query/common/queryEditorService';
|
import { IQueryEditorService } from 'sql/parts/query/common/queryEditorService';
|
||||||
|
|
||||||
import * as strings from 'vs/base/common/strings';
|
import * as strings from 'vs/base/common/strings';
|
||||||
@@ -301,7 +301,9 @@ export class QueryComponent extends GridParentComponent implements OnInit, OnDes
|
|||||||
for (let row = 0; row < rows.rows.length; row++) {
|
for (let row = 0; row < rows.rows.length; row++) {
|
||||||
// Push row values onto end of gridData for slickgrid
|
// Push row values onto end of gridData for slickgrid
|
||||||
gridData.push({
|
gridData.push({
|
||||||
values: rows.rows[row]
|
values: rows.rows[row].map(c => {
|
||||||
|
return mixin({ ariaLabel: c.displayValue }, c);
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5889,9 +5889,9 @@ slice-ansi@0.0.4:
|
|||||||
version "0.0.4"
|
version "0.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35"
|
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35"
|
||||||
|
|
||||||
"slickgrid@github:anthonydresser/SlickGrid#2.3.17":
|
"slickgrid@github:anthonydresser/SlickGrid#2.3.20":
|
||||||
version "2.3.17"
|
version "2.3.17"
|
||||||
resolved "https://codeload.github.com/anthonydresser/SlickGrid/tar.gz/8def7636409c51a10890209f90083bb2c3092b3b"
|
resolved "https://codeload.github.com/anthonydresser/SlickGrid/tar.gz/4b5abb02758844d96886ebf97cc5d84efcecb2af"
|
||||||
dependencies:
|
dependencies:
|
||||||
jquery ">=1.8.0"
|
jquery ">=1.8.0"
|
||||||
jquery-ui ">=1.8.0"
|
jquery-ui ">=1.8.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user