mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
set aria label for table (#8443)
This commit is contained in:
@@ -92,7 +92,8 @@ export class ResourceTypePickerDialog extends DialogBase {
|
|||||||
this._toolsTable = view.modelBuilder.table().withProperties<azdata.TableComponentProperties>({
|
this._toolsTable = view.modelBuilder.table().withProperties<azdata.TableComponentProperties>({
|
||||||
data: [],
|
data: [],
|
||||||
columns: [toolColumn, descriptionColumn, installStatusColumn, versionColumn, minVersionColumn],
|
columns: [toolColumn, descriptionColumn, installStatusColumn, versionColumn, minVersionColumn],
|
||||||
width: tableWidth
|
width: tableWidth,
|
||||||
|
ariaLabel: localize('deploymentDialog.RequiredToolsTitle', "Required tools")
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
const toolsTableWrapper = view.modelBuilder.divContainer().withLayout({ width: tableWidth }).component();
|
const toolsTableWrapper = view.modelBuilder.divContainer().withLayout({ width: tableWidth }).component();
|
||||||
|
|||||||
@@ -364,4 +364,8 @@ export class Table<T extends Slick.SlickData> extends Widget implements IDisposa
|
|||||||
public set ariaRole(value: string) {
|
public set ariaRole(value: string) {
|
||||||
this._tableContainer.setAttribute('role', value);
|
this._tableContainer.setAttribute('role', value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public set ariaLabel(value: string) {
|
||||||
|
this._tableContainer.setAttribute('aria-label', value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -252,6 +252,10 @@ export default class TableComponent extends ComponentBase implements IComponent,
|
|||||||
this._table.ariaRole = this.ariaRole;
|
this._table.ariaRole = this.ariaRole;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.ariaLabel) {
|
||||||
|
this._table.ariaLabel = this.ariaLabel;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.updateCells !== undefined) {
|
if (this.updateCells !== undefined) {
|
||||||
this.updateTableCells(this.updateCells);
|
this.updateTableCells(this.updateCells);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user