diff --git a/extensions/dacpac/src/wizard/pages/dacFxSummaryPage.ts b/extensions/dacpac/src/wizard/pages/dacFxSummaryPage.ts index 82a0198344..4cce0aa379 100644 --- a/extensions/dacpac/src/wizard/pages/dacFxSummaryPage.ts +++ b/extensions/dacpac/src/wizard/pages/dacFxSummaryPage.ts @@ -134,4 +134,3 @@ export class DacFxSummaryPage extends BasePage { }); } } - diff --git a/src/sql/azdata.d.ts b/src/sql/azdata.d.ts index 520372b30d..70e587507f 100644 --- a/src/sql/azdata.d.ts +++ b/src/sql/azdata.d.ts @@ -2941,6 +2941,8 @@ declare module 'azdata' { selectedRows?: number[]; forceFitColumns?: ColumnSizingMode; title?: string; + ariaRowCount?: number; + ariaColumnCount?: number; } export interface FileBrowserTreeProperties extends ComponentProperties { diff --git a/src/sql/base/browser/ui/table/table.ts b/src/sql/base/browser/ui/table/table.ts index 93f3ca17c6..9aa86e5e71 100644 --- a/src/sql/base/browser/ui/table/table.ts +++ b/src/sql/base/browser/ui/table/table.ts @@ -343,4 +343,20 @@ export class Table extends Widget implements IDisposa public setTableTitle(title: string): void { this._tableContainer.title = title; } + + public removeAriaRowCount(): void { + this._tableContainer.removeAttribute('aria-rowcount'); + } + + public set ariaRowCount(value: number) { + this._tableContainer.setAttribute('aria-rowcount', value.toString()); + } + + public removeAriaColumnCount(): void { + this._tableContainer.removeAttribute('aria-colcount'); + } + + public set ariaColumnCount(value: number) { + this._tableContainer.setAttribute('aria-colcount', value.toString()); + } } diff --git a/src/sql/workbench/browser/modelComponents/table.component.ts b/src/sql/workbench/browser/modelComponents/table.component.ts index a575d96585..f14f2f1360 100644 --- a/src/sql/workbench/browser/modelComponents/table.component.ts +++ b/src/sql/workbench/browser/modelComponents/table.component.ts @@ -217,6 +217,20 @@ export default class TableComponent extends ComponentBase implements IComponent, this.registerCheckboxPlugin(this._checkboxColumns[col]); } + if (this.ariaRowCount === -1) { + this._table.removeAriaRowCount(); + } + else { + this._table.ariaRowCount = this.ariaRowCount; + } + + if (this.ariaColumnCount === -1) { + this._table.removeAriaColumnCount(); + } + else { + this._table.ariaColumnCount = this.ariaColumnCount; + } + this.layoutTable(); this.validate(); } @@ -291,4 +305,12 @@ export default class TableComponent extends ComponentBase implements IComponent, public get title() { return this.getPropertyOrDefault((props) => props.title, ''); } + + public get ariaRowCount(): number { + return this.getPropertyOrDefault((props) => props.ariaRowCount, -1); + } + + public get ariaColumnCount(): number { + return this.getPropertyOrDefault((props) => props.ariaColumnCount, -1); + } } diff --git a/src/sql/workbench/services/fileBrowser/browser/fileBrowserDialog.ts b/src/sql/workbench/services/fileBrowser/browser/fileBrowserDialog.ts index 1391eb91d4..af6caa82b3 100644 --- a/src/sql/workbench/services/fileBrowser/browser/fileBrowserDialog.ts +++ b/src/sql/workbench/services/fileBrowser/browser/fileBrowserDialog.ts @@ -88,6 +88,8 @@ export class FileBrowserDialog extends Modal { this._treeContainer = DOM.append(this._body, DOM.$('.tree-view')); let tableContainer: HTMLElement = DOM.append(DOM.append(this._body, DOM.$('.option-section')), DOM.$('table.file-table-content')); + tableContainer.setAttribute('role', 'presentation'); + let pathLabel = localize('filebrowser.filepath', "Selected path"); let pathBuilder = DialogHelper.appendRow(tableContainer, pathLabel, 'file-input-label', 'file-input-box'); this._filePathInputBox = new InputBox(pathBuilder, this._contextViewService, {