Skip to content

Commit 5809e51

Browse files
committed
fix: always apply role="row" on summary row
Moves the definition of role and tabindex to the `datatable-body-row`. This ensures `role="row"` is always present on the summary-row. Previously, the role="row" was missing on summary rows with position top.
1 parent f780ebb commit 5809e51

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

projects/ngx-datatable/src/lib/components/body/body-row.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ import { DataTableBodyCellComponent } from './body-cell.component';
5959
styleUrl: './body-row.component.scss',
6060
changeDetection: ChangeDetectionStrategy.OnPush,
6161
host: {
62+
role: 'row',
63+
tabindex: '-1',
6264
'[class]': 'cssClass()',
6365
'[class.active]': 'isSelected()',
6466
'[class.datatable-row-odd]': 'innerRowIndex() % 2 !== 0',

projects/ngx-datatable/src/lib/components/body/body.component.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ import { DataTableSummaryRowComponent } from './summary/summary-row.component';
131131
>
132132
<datatable-body-row
133133
#rowElement
134-
role="row"
135-
tabindex="-1"
136134
[disabled]="disabled"
137135
[isSelected]="getRowSelected(row)"
138136
[columns]="columns"
@@ -232,7 +230,6 @@ import { DataTableSummaryRowComponent } from './summary/summary-row.component';
232230
</datatable-scroller>
233231
@if (summaryRow() && summaryPosition() === 'bottom') {
234232
<datatable-summary-row
235-
role="row"
236233
[rowHeight]="summaryHeight()"
237234
[innerWidth]="innerWidth()"
238235
[rows]="rows"

projects/ngx-datatable/src/lib/components/body/summary/summary-row.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const noopSumFunc = (cells: any[]): void => {
2828
@let _internalColumns = this._internalColumns();
2929
@if (summaryRow && _internalColumns.length) {
3030
<datatable-body-row
31-
tabindex="-1"
3231
ariaRowCheckboxMessage=""
3332
[columns]="_internalColumns"
3433
[rowHeight]="rowHeight()"

0 commit comments

Comments
 (0)