-
+<!-- note that colgroups are set up in grid.component.html -->
<tr row="row" class="eg-grid-row eg-grid-header-row">
<ng-container *ngIf="!context.disableSelect">
(dragover)="onColumnDragEnter($event, col)"
(dragleave)="onColumnDragLeave($event, col)"
[ngClass]="{'dragover' : col.isDragTarget}"
+ [attr.aria-sort]="ariaSortDirection(col)"
class="eg-grid-cell eg-grid-header-cell eg-grid-col-{{col.name}} eg-grid-type-{{col.datatype}} eg-grid-class-{{context.idlClass}} {{context.cellClassCallback(row, col)}}">
<a class="sortable label-with-material-icon" *ngIf="col.isSortable"
(click)="sortOneColumn(col)">
return sort && sort.dir === dir;
}
+ // Returns sorting direction in ARIA's required format
+ ariaSortDirection(col: GridColumn): string {
+ const sort = this.context.dataSource.sort.filter(c => c.name === col.name)[0];
+
+ if (sort && sort.dir === 'ASC')
+ return 'ascending';
+ if (sort && sort.dir === 'DESC')
+ return 'descending';
+
+ return null;
+ }
+
handleBatchSelect($event) {
if ($event.target.checked) {
if (this.context.rowSelector.isEmpty() || !this.allRowsAreSelected()) {
<!-- eg-grid-print -->
+ <caption>
<ng-container *ngIf="dataSource.data.length === 0">
<ng-container *ngIf="dataSource.requestingData">
- <caption>
+ <span>
<eg-progress-inline></eg-progress-inline>
- </caption>
+ </span>
</ng-container>
<ng-container *ngIf="!dataSource.requestingData">
- <caption i18n *ngIf="dataSource.retrievalError">
+ <span i18n *ngIf="dataSource.retrievalError">
Error Retrieving Results
- </caption>
- <caption i18n *ngIf="!dataSource.retrievalError">
+ </span>
+ <span i18n *ngIf="!dataSource.retrievalError">
Nothing to Display
- </caption>
+ </span>
</ng-container>
</ng-container>
-
+ </caption>
+
<colgroup class="eg-grid-col-utilities">
<col *ngIf="!context.disableSelect" class="eg-grid-col eg-grid-checkbox-col">
<col class="eg-grid-col eg-grid-number-col">