aria-sort
TokenIndicates whether a table or grid column is currently sorted and in which direction — ascending, descending, other, or none. Put it on the header cell of the sorted column, and mark only one column at a time. Screen readers announce the sort state so users understand how the data is ordered.
Values
- none (default)
- There is no defined sort applied.
- ascending
- Items are sorted in ascending order.
- descending
- Items are sorted in descending order.
- other
- A sort algorithm other than ascending or descending was applied.
Used on
<th>
Associated roles
Example
aria-sort="…"
<th aria-sort="ascending">
<button>Name</button>
</th>References