diff --git a/src/app/components/table/table.ts b/src/app/components/table/table.ts index 6724e867ea5..f65337efa1b 100644 --- a/src/app/components/table/table.ts +++ b/src/app/components/table/table.ts @@ -1138,7 +1138,8 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable public tableService: TableService, public cd: ChangeDetectorRef, public filterService: FilterService, - public overlayService: OverlayService + public overlayService: OverlayService, + public config: PrimeNGConfig ) { this.window = this.document.defaultView as Window; } @@ -4494,9 +4495,9 @@ export class CellEditor implements AfterContentInit { template: `
- +
-
+
@@ -4531,6 +4532,7 @@ export class TableRadioButton { constructor(public dt: Table, public cd: ChangeDetectorRef) { this.subscription = this.dt.tableService.selectionSource$.subscribe(() => { this.checked = this.dt.isSelected(this.value); + this.ariaLabel = this.ariaLabel || this.dt.config.translation.aria ? (this.checked ? this.dt.config.translation.aria.selectRow : this.dt.config.translation.aria.unselectRow) : undefined; this.cd.markForCheck(); }); } @@ -4574,9 +4576,9 @@ export class TableRadioButton { template: `
- +
-
+
@@ -4616,6 +4618,7 @@ export class TableCheckbox { constructor(public dt: Table, public tableService: TableService, public cd: ChangeDetectorRef) { this.subscription = this.dt.tableService.selectionSource$.subscribe(() => { this.checked = this.dt.isSelected(this.value); + this.ariaLabel = this.ariaLabel || this.dt.config.translation.aria ? (this.checked ? this.dt.config.translation.aria.selectRow : this.dt.config.translation.aria.unselectRow) : undefined; this.cd.markForCheck(); }); } @@ -4657,9 +4660,9 @@ export class TableCheckbox { template: `
- +
-
+
@@ -4695,6 +4698,7 @@ export class TableHeaderCheckbox { constructor(public dt: Table, public tableService: TableService, public cd: ChangeDetectorRef) { this.valueChangeSubscription = this.dt.tableService.valueSource$.subscribe(() => { this.checked = this.updateCheckedState(); + this.ariaLabel = this.ariaLabel || this.dt.config.translation.aria ? (this.checked ? this.dt.config.translation.aria.selectAll : this.dt.config.translation.aria.unselectAll) : undefined; }); this.selectionChangeSubscription = this.dt.tableService.selectionSource$.subscribe(() => { @@ -4910,6 +4914,7 @@ export class ReorderableRow implements AfterViewInit { type="button" class="p-column-filter-menu-button p-link" aria-haspopup="true" + [attr.aria-controls]="overlayId" [attr.aria-expanded]="overlayVisible" [ngClass]="{ 'p-column-filter-menu-button-open': overlayVisible, 'p-column-filter-menu-button-active': hasFilter() }" (click)="toggleMenu()" @@ -4927,6 +4932,9 @@ export class ReorderableRow implements AfterViewInit {
this.field]) { this.initFieldFilterConstraint(); }