aria-sort (property) is used to inform the screen reader user whether the columns or rows in a grid can be sorted. Aria-sort (property) is used to a table header or a grid header. This aria-sort (property) can be used both for column headers or row headers.
aria-sort (property) has two possible values “ascending” and “descending”. aria-sort=”none” is the default value and aria-sort=”other” is used to define any values other than ascending or descending. Aria-sort (property) can be applied on only one header at a time.
Values of aria-sort (property)
Value | Description | Ascending | Items are sorted in ascending order by this column. |
---|---|
Descending | Items are sorted in descending order by this column. |
None (default) | There is no defined sort applied to the column. |
Other | A sort algorithm other than ascending or descending has been applied. |
Aria-sort (property) used in roles
Here is an example from Deque University using aria-sort (property)
.