add aria-sort (#4997)

This commit is contained in:
Cilibiu Bogdan
2019-08-19 13:33:48 +03:00
committed by Denys Vuika
parent 83412bb9b6
commit f5c5e7cf9e
2 changed files with 8 additions and 1 deletions

View File

@@ -25,6 +25,11 @@
(keyup.enter)="onColumnHeaderClick(col)"
role="columnheader"
tabindex="0"
[attr.aria-sort]="col.sortable ?
((isColumnSorted(col, 'asc') ?
'ADF-DATATABLE.ACCESSIBILITY.SORT_ASCENDING':
'ADF-DATATABLE.ACCESSIBILITY.SORT_DESCENDING') | translate) :
null"
title="{{ col.title | translate }}"
adf-drop-zone dropTarget="header" [dropColumn]="col">
<span *ngIf="col.srTitle" class="adf-sr-only">{{ col.srTitle | translate }}</span>