Favorites

HTML aria-sort ARIA Attribute

aria-sort
ARIA AttributeThis ARIA attribute is supported by all modern browsers.
Updated 28th November 2026

The aria-sort attribute tells assistive technology which column or row header a table is sorted by, and whether the sort is ascending or descending.

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee

Description

The aria-sort attribute indicates that a table or grid is sorted by a column or row, and in which direction. It goes on the header cell: a <th>, or an element with the columnheader or rowheader role. Screen readers announce it, for example "Price, column header, sorted ascending".

Only put it on one header at a time, the one the table is currently sorted by, and update it when the sort changes. Leave it off the other headers rather than setting none on all of them. The values ascending and descending are the common ones; other is for a sort that is neither.

The attribute does not sort anything. To let users change the sort, place a <button> inside the header and announce the result if it isn't obvious.

Properties

Type
Widget
Value
token
Default
none
Used with
columnheader, rowheader

Syntax

<th aria-sort="ascending | descending | none | other">

Values

  • ascendingItems are sorted in ascending order by this column.
  • descendingItems are sorted in descending order by this column.
  • noneThe default: no sort is applied.
  • otherA sort other than ascending or descending is applied.

Example

<table>
<tr>
<th aria-sort="ascending"><button type="button">Name &#9650;</button></th>
<th><button type="button">Price</button></th>
</tr>
<tr><td>Apple</td><td>$1.20</td></tr>
<tr><td>Banana</td><td>$0.50</td></tr>
</table>

Browser Support

The following information will show you the current browser support for the aria-sort ARIA attribute. Hover over a browser icon to see the version that first introduced support for this ARIA attribute.

This ARIA attribute is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee