mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-30 09:35:39 -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>({
|
||||
data: [],
|
||||
columns: [toolColumn, descriptionColumn, installStatusColumn, versionColumn, minVersionColumn],
|
||||
width: tableWidth
|
||||
width: tableWidth,
|
||||
ariaLabel: localize('deploymentDialog.RequiredToolsTitle', "Required tools")
|
||||
}).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) {
|
||||
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;
|
||||
}
|
||||
|
||||
if (this.ariaLabel) {
|
||||
this._table.ariaLabel = this.ariaLabel;
|
||||
}
|
||||
|
||||
if (this.updateCells !== undefined) {
|
||||
this.updateTableCells(this.updateCells);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user