ARIA States & Properties
aria-sort
Describes the sort order of a table or grid column or row. Apply to the relevant header rather than the table; normally only one header is marked as sorted at a time. It does not sort data itself. Value type: token. Accepted values: none, ascending, descending, other. Default or omitted behavior: none. Applicable context: columnheader, rowheader. Use only where allowed for the element’s implicit or explicit role. ARIA describes accessibility semantics; it does not automatically implement the associated behavior. Test with the relevant browser and assistive technology.
Formal Syntax & Structure
html syntaxhtml
aria-sort="ascending"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| aria-sort | token | Accepted values: none, ascending, descending, other. Default or omitted behavior: none. Context: columnheader, rowheader. Requiredness depends on the role. |
Working Example
Example Snippethtml
<table> <tr> <th scope="col" aria-sort="ascending">Name</th> </tr> <tr> <td>Ada</td> </tr> <tr> <td>Grace</td> </tr></table>