|
28 | 28 | </div> |
29 | 29 |
|
30 | 30 | <!-- Columns --> |
31 | | - <th *ngIf="multiselect" class="adf-datatable-cell-header adf-datatable-checkbox" role="columnheader"> |
| 31 | + <div *ngIf="multiselect" class="adf-datatable-cell-header adf-datatable-checkbox"> |
32 | 32 | <mat-checkbox [indeterminate]="isSelectAllIndeterminate" |
33 | 33 | [checked]="isSelectAllChecked" |
34 | 34 | (change)="onSelectAllClick($event)" |
35 | 35 | class="adf-checkbox-sr-only" |
36 | 36 | [aria-label]="'ADF-DATATABLE.ACCESSIBILITY.SELECT_ALL' | translate"> |
37 | 37 | {{ 'ADF-DATATABLE.ACCESSIBILITY.SELECT_ALL' | translate }} |
38 | 38 | </mat-checkbox> |
39 | | - </th> |
| 39 | + </div> |
40 | 40 |
|
41 | 41 | <ng-container |
42 | 42 | *ngFor=" |
|
54 | 54 | 'adf-datatable__header--sorted-asc': isColumnSorted(col, 'asc'), |
55 | 55 | 'adf-datatable__header--sorted-desc': isColumnSorted(col, 'desc')}" |
56 | 56 | [ngStyle]="(col.width) && !lastColumn && {'flex': getFlexValue(col)}" |
57 | | - [attr.aria-label]="(col.title ? (col.title | translate) : '') + (col.subtitle ? ' ' + col.subtitle : '')" |
| 57 | + [attr.aria-label]="(col.title | translate) + (col.subtitle ? ' ' + col.subtitle : '')" |
58 | 58 | (click)="onColumnHeaderClick(col, $event)" |
59 | 59 | (keyup.enter)="onColumnHeaderClick(col, $event)" |
60 | 60 | role="columnheader" |
|
156 | 156 | [class.adf-datatable-actions-menu-provided]="showProvidedActions" |
157 | 157 | > |
158 | 158 | <ng-container *ngIf="mainActionTemplate"> |
159 | | - <td role="gridcell"> |
160 | | - <button |
161 | | - data-automation-id="adf-datatable-main-menu-button" |
162 | | - title="{{ 'ADF-DATATABLE.CONTENT-ACTIONS.SELECT_COLUMNS' | translate }}" |
163 | | - [attr.aria-label]="'ADF-DATATABLE.CONTENT-ACTIONS.SELECT_COLUMNS' | translate" |
164 | | - mat-icon-button |
165 | | - #mainMenuTrigger="matMenuTrigger" |
166 | | - (click)="onMainMenuOpen()" |
167 | | - [matMenuTriggerFor]="mainMenu"> |
168 | | - <mat-icon>view_week_outline</mat-icon> |
169 | | - </button> |
170 | | - <mat-menu #mainMenu (closed)="onMainMenuClosed()"> |
171 | | - <div #mainMenuTemplate role="presentation" (keydown.tab)="$event.stopPropagation()"> |
172 | | - <ng-container |
173 | | - [ngTemplateOutlet]="mainActionTemplate" |
174 | | - [ngTemplateOutletContext]="{ |
175 | | - $implicit: mainMenuTrigger |
176 | | - }" /> |
177 | | - </div> |
178 | | - </mat-menu> |
179 | | - </td> |
| 159 | + <button |
| 160 | + data-automation-id="adf-datatable-main-menu-button" |
| 161 | + title="{{ 'ADF-DATATABLE.CONTENT-ACTIONS.SELECT_COLUMNS' | translate }}" |
| 162 | + mat-icon-button |
| 163 | + #mainMenuTrigger="matMenuTrigger" |
| 164 | + (click)="onMainMenuOpen()" |
| 165 | + [matMenuTriggerFor]="mainMenu"> |
| 166 | + <mat-icon>view_week_outline</mat-icon> |
| 167 | + </button> |
| 168 | + <mat-menu #mainMenu (closed)="onMainMenuClosed()"> |
| 169 | + <div #mainMenuTemplate role="presentation" (keydown.tab)="$event.stopPropagation()"> |
| 170 | + <ng-container |
| 171 | + [ngTemplateOutlet]="mainActionTemplate" |
| 172 | + [ngTemplateOutletContext]="{ |
| 173 | + $implicit: mainMenuTrigger |
| 174 | + }" /> |
| 175 | + </div> |
| 176 | + </mat-menu> |
180 | 177 | <span class="adf-sr-only">{{ 'ADF-DATATABLE.ACCESSIBILITY.ACTIONS' | translate }}</span> |
181 | 178 | </ng-container> |
182 | 179 | </div> |
|
240 | 237 | </mat-menu> |
241 | 238 | </div> |
242 | 239 |
|
243 | | - <td *ngIf="multiselect" |
| 240 | + <label *ngIf="multiselect" |
244 | 241 | (keydown.enter)="onEnterKeyPressed(row, $any($event))" |
245 | 242 | (click)="onCheckboxLabelClick(row, $event)" |
246 | | - role="gridcell" |
| 243 | + [for]="'select-file-' + idx" |
247 | 244 | class="adf-datatable-cell adf-datatable-checkbox adf-datatable-checkbox-single" |
248 | | - tabindex="-1"> |
| 245 | + tabindex="0"> |
249 | 246 | <mat-checkbox |
250 | 247 | [id]="'select-file-' + idx" |
251 | 248 | [disabled]="!row?.isSelectable" |
|
260 | 257 | class="adf-checkbox-sr-only"> |
261 | 258 | {{ 'ADF-DATATABLE.ACCESSIBILITY.SELECT_FILE' | translate }} |
262 | 259 | </mat-checkbox> |
263 | | - </td> |
| 260 | + </label> |
264 | 261 |
|
265 | 262 | <div |
266 | 263 | *ngFor="let col of getVisibleColumns(); let lastColumn = last;" |
|
0 commit comments