From 4ebe772cf4bead094b9e69bfe0e061cb36fc9709 Mon Sep 17 00:00:00 2001 From: Matt King Date: Sun, 29 Oct 2017 17:11:35 -0700 Subject: [PATCH] Grid and Table Properties Guidance: Revise aria-sort subsection For issue #65, in aria-practices.html, revised rough draft of the section covering aria-sort. 1. Add note about using on multiple columns. 2. Revisions to wording for accuracy and clarity. 3. Clarified it can be used on rows as well as columns. 4. Correct spelling, grammar, etc. --- aria-practices.html | 47 ++++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 30 deletions(-) diff --git a/aria-practices.html b/aria-practices.html index 2fbf51942f..3e4ff28ab8 100644 --- a/aria-practices.html +++ b/aria-practices.html @@ -3888,7 +3888,7 @@

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.

- +
@@ -4256,55 +4256,45 @@

Defining cell spans using aria-colspan and aria-rowspan
-

- Identifying row sorting using aria-sort -

+

Indicating sort order with aria-sort

- When rows are sorted based on one of the values in one of the columns - the aria-sort attribute must be used on the - columnheader to identify the column being used to - sort the rows of the table or grid. The following table describes the - options for the values of aria-sort. + When rows or columns are sorted, the aria-sort property can be applied to a column or row header to indicate the sorting method. + The following table describes allowed values for aria-sort.

-

Property
- - + - - + - + - + - +
Description of values for aria-sort + Description of values for aria-sort +
Value Description
ascendingRows are sorted in ascending order by this columnData are sorted in ascending order.
descendingItems are sorted in descending order by this column.Data are sorted in descending order.
otherRows are sorted by an algorithm other than ascending or - descending by this column. - Data are sorted by an algorithm other than ascending or descending.
noneThis 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>