Issue
The purpose and context of sortable table header links is not provided in an accessible manner. Also, the "Sort icon" does not convey the order of the sort (ascending vs. descending).
Success criterion 2.4.4 of WCAG 2.0 requires that:
Link Purpose (In Context): The purpose of each link can be determined from the link text alone or from the link text together with its programmatically
determined link context, except where the purpose of the link would be ambiguous to users in general
Recommendations
Provide accessible purpose for the sortable table header links.
Modify the alt attribute for the "sort icon" to "Sorted Ascending" or "Sorted Descending" depending on the sort order.
Resources
Understanding Success Criterion 2.4.4 | Understanding WCAG 2.0
- http://www.w3.org/TR/2008/NOTE-UNDERSTANDING-WCAG20-20081211/navigation-...
Comment | File | Size | Author |
---|---|---|---|
#11 | issue541612-sort-order-alt-3.patch | 2.05 KB | mgifford |
#3 | issue541612-sort-order-alt-2.patch | 1.76 KB | mgifford |
#1 | issue541612-sort-order-alt.patch | 2.4 KB | mgifford |
Comments
Comment #1
mgiffordSo although it duplicates title & alt tag, think this is the best expression of this need to have understandable table ordering.
Comment #2
Everett Zufelt CreditAttribution: Everett Zufelt commentedThis patch looks good, needs to be rerolled without the unintentional changes to theme_feed_icon() which were included.
I would say that having the properly labeled sort icon gives sufficient context to the table header links.
Comment #3
mgiffordGood point on the theme_feed_icon() from a previous patch.
Comment #4
Everett Zufelt CreditAttribution: Everett Zufelt commentedApplied the patch in #3 it works to provide information about the sort order of the sorted column.
Still thinking that we need to provide more information about the purpose of each link, however, perhaps the purpose is intuitive based on the fact that they are links in the header of a data table?
Comment #5
mgiffordIs there a best practice out there for providing descriptive information about this type of ordering to assistive technology?
Comment #6
Everett Zufelt CreditAttribution: Everett Zufelt commented@mgifford
The best practice is that the role of links need to be determinable by their context. This is clearly somewhat subjective. Whereas some users my realize that a link in the header of a data table is for ordering some others may not. The table header links already have the title attribute of "Sort by ". Which may imply that it is desirable to provide indication of the role of the links.
Comment #7
mgiffordCan we get #3 RTBC as it does provide an enhancement in accessibility to what is there now.
We can then look at a broader model for accepting and passing along additional meaning for D8. I don't think we can build out this larger piece before now and Nov 15th.
Comment #8
BarisW CreditAttribution: BarisW commentedThe patch works. However, wouldn't it be better to add information to the LINK instead of the icon?
So instead of:
make it:
As far as I understood, the ALT text should describe the image, not its function. Am I wrong on this?
Comment #9
mgiffordThe image changes, the link doesn't. The goal is to provide additional meaning and context to assistive technology. I don't think it would be wrong to add additional information to the link but it's harder to do. Adding "sort descending" to both the alt text & title of the image is a sufficient way to convey this information.
Comment #11
mgiffordJust re-rolled this. It's a really simple addition really. Should just be RTBC'd.
Comment #12
BarisW CreditAttribution: BarisW commentedComment #13
mgiffordThis was first RTBC just about two weeks ago.
Comment #14
webchick@mgifford and others: Pursuant to the Drupal 7 development schedule, patches around API clean-ups and feature exceptions were given priority during the period from Drupalcon to Oct. 15 (later extended to Oct. 17). Over the next month (from now until Dec. 1) is where we focus on accessibility, usability, and performance.
Anyway, this change looks fine. Committed to HEAD.
Comment #15
mgiffordThanks for the clarification! Some patches haven't been written yet as they were waiting to get some already RTBC'd into core.
I was very encouraged to see Dries post: http://drupal.org/node/619258
I guess that when I looked at the Drupal 7 development schedule published in September I thought that RTBC'd code would get committed throughout. I hadn't realized that there was enough need to review other code that accessibility changes would largely be put off until November.
I can't imagine the role that you & Dries have had to play in this. Quite the huge undertaking, with each small community only really aware of their concerns.
Anyways, thanks again!