From 4ebe772cf4bead094b9e69bfe0e061cb36fc9709 Mon Sep 17 00:00:00 2001
From: Matt King Grid and Table Properties
additionally, some of this information, like skipped columns or rows and how data is sorted, cannot be derived from the DOM structure.
The below sections explain how to use the following properties that ARIA provides for grid and table accessibility.
-Property | @@ -4256,55 +4256,45 @@
---|
Value | Description | |
---|---|---|
ascending |
- Rows are sorted in ascending order by this column | +Data are sorted in ascending order. |
descending |
- Items are sorted in descending order by this column. | +Data are sorted in descending order. |
other |
- Rows are sorted by an algorithm other than ascending or - descending by this column. - | +Data are sorted by an algorithm other than ascending or descending. |
none |
- This column is not used for sorting the rows. | +Default (no sort applied). |
The following example shows using the aria-sort
to show
- that the rows are sorted based on the score of "Quiz 2". The
- aria-sort="descending"
identifies the rows being
- sorted from highest score to lowest score.
+
+ It is important to note that ARIA does not provide a way to indicate levels of sort for data sets that have multiple sort keys.
+ Thus, there is limited value to applying aria-sort
with a value other than none
to more than one column or row.
The following example grid uses aria-sort
to indicate the rows are sorted from the highest "Quiz 2" score to the lowest "Quiz 2" score.
<table role="grid" aria-rowcount="463">
@@ -4313,11 +4303,8 @@
<tr aria-colindex="10" aria-rowindex="1">
<th>Homework 4</th>
<!--
- aria-sort is used to identify the column with the heading
- "Quiz 2" being used to sort the rows of the grid. The
- value of aria-sort identifies the rows are being sorted in
- descending order (e.g. highest score to lowest
- score)
+ aria-sort indicates the column with the heading
+ "Quiz 2" has been used to sort the rows of the grid.
-->
<th aria-sort="descending">Quiz 2</th>
<th>Homework 5</th>