-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aria-sort should be allowed on multiple columns #283
Comments
See also: #582 |
Adding the "Agenda" label: I don't think this needs to be an ARIA 2.0 thing. Tables exist in the wild that have this functionality, and I don't believe it would be hard to support this in ATs or browsers. |
@jnurthen found an example that uses shift-click to sort multiple columns: https://datatables.net/examples/basic_init/multi_col_sort.html I don't think this is a particularly clear user interface—Of the sorted columns, which has priority?—but since it's being used in sites, I see no issue with allowing |
Quick brainstorm: the "multi-column sort order/priority" problem might be solved as a new attribute |
In the applications I know, this is very clearly marked with numbers in the column headings
I would prefer the new attribute because the second variant differs greatly from the current ARIA standard (one attribute for two different value types: name and number) |
Screen shots and/or more specific references to those may help. I don't think I've ever seen any, and no one else on the call could think of examples that conveyed the order. |
I am not allowed to publish screenshots of internal company applications, but a google search for "table multiple sort" finds many examples, e.g. https://blog.ofanitguy.com/2014/03/06/ls2013-html-enhancing-table-control-with-column-sort-and-filters/ |
As a matter of fact, multiple sorts in tables are not rare in real life business applications. |
@stes-acc do you want to take ownership of this? |
Yes |
I have a prototype of a table where more than one column can be sorted at a time. I have multiple clients whose data tables do this. I cannot share the client examples, but I can share the prototype, variants of which are in user-facing sites:
Visually, it puts numbers on the column headings to indicate which column is sorted first, and then next, and so on. Programmatically, since there is no way to indicate a ranking or priority, I append "priority #" to the accDesc for the column. It is a bit wordy, but seems to have so far gotten the point across. In the attached screen shot, I am showing the Year column is sorted descended, and then Title is sorted ascending, and then Author is sorted descending. On sort in this case, the live region announced (Year was already apparent from the control name): "sorted down, Author descending priority 3, Title ascending priority 2" For the programmatic bits once it is in the state shown in the image:
I am not saying this is the right way to handle it. It does show a representation of what is in the wild and identifies gaps in how it should convey ranking/priority. |
Just a quick note as a library author to say that |
@aardrian would you want to take this on by any chance? |
…name from content (#283) Text level elements are not mapped to ARIA roles, but ARIA name computation alg strictly defines roles which allow name from content; also the behavior doens't match implementations Co-authored-by: Scott O'Hara <scottaohara@users.noreply.github.com>
aria-sort states
"For each table or grid, authors should apply aria-sort to only one header at a time."
It is relatively common in large tables to allow multiple columns to be used in the sort criteria.
Sort by column 1 then sort by column 2 etc.
We should be able to use aria-sort for this.
The text was updated successfully, but these errors were encountered: