Description
Description
When using keyboard only, the HTML node used for sorting the columns is not keyboard accessible and there is no accessibility code to convey to a screen reader the current state (ascending or descending) of that button
Solution
The [div class=”sort-icon”] should be a button (with a descriptive aria-label) to make it accessible. Some kind of method needs to indicate to the screen reader of its state and the direction of the column ordering (ascending or descending). I assume this can be added to the same function that adds/updates the classname of 'desc'
Alternatives
At a minimum, the aria-sort attribute could be used for the first (primary) column of the data grid that is being sorted. For multi-sorting grids, add/update the buttons aria-label to indicate “sorted ascending 1” or “sorted descending 2” (for example)
Reference
https://www.w3.org/WAI/ARIA/apg/patterns/table/examples/sortable-table/