Adding aria label to "check all" check box in declarative table. (#13216)

* added arialable for check all checkboxes and added some missing roles for the table elements

* removed duplicate attribute

* Moved column header aria label logic to a function.

* fixed typos in declarative table

* Changed the aria label text to something that is more intuiive.

* fixed typo in localized string identifier
This commit is contained in:
Aasim Khan
2020-11-06 10:44:33 -08:00
committed by GitHub
parent cd6fa08543
commit 054583e0de
2 changed files with 57 additions and 41 deletions

View File

@@ -220,6 +220,15 @@ export default class DeclarativeTableComponent extends ContainerBase<any, azdata
return '';
}
public getCheckAllColumnAriaLabel(colIdx: number): string {
return localize('checkAllColumnLabel', "check all checkboxes in column: {0}", this.columns[colIdx].displayName);
}
public getHeaderAriaLabel(colIdx: number): string {
const column = this.columns[colIdx];
return (column.ariaLabel) ? column.ariaLabel : column.displayName;
}
public getItemDescriptor(componentId: string): IComponentDescriptor {
return this.modelStore.getComponentDescriptor(componentId);
}