Skip to content

Commit

Permalink
Table | Add missing role attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Nov 20, 2023
1 parent 5222946 commit 92d4148
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,11 @@ export class TableService {
[attr.id]="id + '-table'"
>
<ng-container *ngTemplateOutlet="colGroupTemplate; context: { $implicit: scrollerOptions.columns }"></ng-container>
<thead #thead class="p-datatable-thead">
<thead role="rowgroup" #thead class="p-datatable-thead">
<ng-container *ngTemplateOutlet="headerGroupedTemplate || headerTemplate; context: { $implicit: scrollerOptions.columns }"></ng-container>
</thead>
<tbody
role="rowgroup"
class="p-datatable-tbody p-datatable-frozen-tbody"
*ngIf="frozenValue || frozenBodyTemplate"
[value]="frozenValue"
Expand All @@ -234,6 +235,7 @@ export class TableService {
[frozen]="true"
></tbody>
<tbody
role="rowgroup"
class="p-datatable-tbody"
[ngClass]="scrollerOptions.contentStyleClass"
[style]="scrollerOptions.contentStyle"
Expand All @@ -242,8 +244,8 @@ export class TableService {
[pTableBodyTemplate]="bodyTemplate"
[scrollerOptions]="scrollerOptions"
></tbody>
<tbody *ngIf="scrollerOptions.spacerStyle" [style]="'height: calc(' + scrollerOptions.spacerStyle.height + ' - ' + scrollerOptions.rows.length * scrollerOptions.itemSize + 'px);'" class="p-datatable-scroller-spacer"></tbody>
<tfoot *ngIf="footerGroupedTemplate || footerTemplate" #tfoot class="p-datatable-tfoot">
<tbody role="rowgroup" *ngIf="scrollerOptions.spacerStyle" [style]="'height: calc(' + scrollerOptions.spacerStyle.height + ' - ' + scrollerOptions.rows.length * scrollerOptions.itemSize + 'px);'" class="p-datatable-scroller-spacer"></tbody>
<tfoot role="rowgroup" *ngIf="footerGroupedTemplate || footerTemplate" #tfoot class="p-datatable-tfoot">
<ng-container *ngTemplateOutlet="footerGroupedTemplate || footerTemplate; context: { $implicit: scrollerOptions.columns }"></ng-container>
</tfoot>
</table>
Expand Down

0 comments on commit 92d4148

Please sign in to comment.