Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
aria-sort is a WAI-ARIA property that "Indicates if items in a table or grid are sorted in ascending or descending order" ( http://www.w3.org/TR/wai-aria/states_and_properties#aria-sort ).
This should be added to table sort, and anywhere else that grid / columns are sorted / sortable.
Comment | File | Size | Author |
---|---|---|---|
#17 | 1342760-aria-sort_15.patch | 867 bytes | Everett Zufelt |
#13 | 1342760-aria-sort_13.patch | 882 bytes | Everett Zufelt |
#10 | 1342760-aria-sort_10.patch | 867 bytes | Everett Zufelt |
#6 | Aria-sort.png | 182.85 KB | mgifford |
#4 | 1342760-aria-sort_2.patch | 649 bytes | Everett Zufelt |
Comments
Comment #1
Everett Zufelt CreditAttribution: Everett Zufelt commentedThis is supported by at least one piece of assistive technology, NVDA 2011.2 ( http://www.nvda-project.org/releaseChanges/nvda_2011.3rc1_changes.html )
Comment #2
Everett Zufelt CreditAttribution: Everett Zufelt commentedComment #3
Everett Zufelt CreditAttribution: Everett Zufelt commentedThis patch ads the aria-sort attribute to the table header cell of the currently sorted column.
I'm not sure if inline documentation is required, thoughts?
Comment #4
Everett Zufelt CreditAttribution: Everett Zufelt commentedRemoved unnecessary variable initialization.
Comment #5
mgiffordPatch applies nicely. I need to re-install D8 though to review the effect.
Comment #6
mgiffordOk, after getting D8 again, I can confirm that this works as expected and have included a screenshot with a firebug view.
Comment #7
ksenzeeI think this needs a code comment, since most people won't understand what "aria-sort" is or does.
Comment #8
Everett Zufelt CreditAttribution: Everett Zufelt commented@ksenzee
Can you point me to any documentation standards for inline comments of this type? If they exist. I would assume that a URL for the definition in the WAI-ARIA spec would be useful.
Perhaps (obviously only 80 chars / line):
// aria-sort is a WAI-ARIA property that Indicates if items in a table or grid are sorted in ascending or descending order. See http://www.w3.org/TR/wai-aria/states_and_properties#aria-sort
Comment #9
ksenzeeYes, that's just the kind of thing I had in mind.
Comment #10
Everett Zufelt CreditAttribution: Everett Zufelt commentedAdded inline comment.
Comment #11
bdone CreditAttribution: bdone commentedI've tested and confirmed that patch #10 adds the WAI-ARIA attribute and comment to core/includes/tablesort.inc.
But, the casing of "Indicates" should be changed to "indicates".
After that's fixed, it should be marked RTBC, in my opinion.
Comment #12
bdone CreditAttribution: bdone commentedUpdating status, for the casing in comment #11
Comment #13
Everett Zufelt CreditAttribution: Everett Zufelt commentedCorrected code comment as per #11
Comment #14
Everett Zufelt CreditAttribution: Everett Zufelt commentedI'm not in support of backporting to D7.
- This is a markup change.
- This invalidates xhtml 1.0 pages.
Comment #15
Bojhan CreditAttribution: Bojhan commentedBack to RTBC per #11.
Comment #17
Everett Zufelt CreditAttribution: Everett Zufelt commentedNot sure why that won't apply, but this should work.
Comment #18
Bojhan CreditAttribution: Bojhan commentedComment #19
Dries CreditAttribution: Dries commentedCommitted to 8.x. Marking 'fixed'.